diff --git a/Android.mk b/Android.mk index 44a1f03..2fe241a 100644 --- a/Android.mk +++ b/Android.mk @@ -26,7 +26,7 @@ LOCAL_MODULE := recovery LOCAL_FORCE_STATIC_EXECUTABLE := true -RECOVERY_VERSION := ClockworkMod Recovery v4.0.0.3 +RECOVERY_VERSION := ClockworkMod Recovery v4.0.0.4 LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)" RECOVERY_API_VERSION := 2 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) diff --git a/nandroid.c b/nandroid.c index 566b535..ae10ca8 100644 --- a/nandroid.c +++ b/nandroid.c @@ -315,13 +315,13 @@ static void ensure_directory(const char* dir) { __system(tmp); } -typedef int (*nandroid_restore_handler)(const char* backup_file_image, const char* backup_path, file_event_callback callback); +typedef int (*nandroid_restore_handler)(const char* backup_file_image, const char* backup_path, int callback); -static int unyaffs_wrapper(const char* backup_file_image, const char* backup_path, file_event_callback callback) { +static int unyaffs_wrapper(const char* backup_file_image, const char* backup_path, int callback) { return unyaffs(backup_file_image, backup_path, callback); } -static int tar_extract_wrapper(const char* backup_file_image, const char* backup_path, file_event_callback callback) { +static int tar_extract_wrapper(const char* backup_file_image, const char* backup_path, int callback) { char tmp[PATH_MAX]; sprintf(tmp, "cd $(dirname %s) ; tar xvf %s ; exit $?", backup_path, backup_file_image); @@ -333,8 +333,8 @@ static int tar_extract_wrapper(const char* backup_file_image, const char* backup } while (fgets(path, PATH_MAX, fp) != NULL) { - if (NULL != callback) - callback(path); + if (callback) + yaffs_callback(path); } return __pclose(fp); diff --git a/roots.c b/roots.c index 386d5fa..527fc59 100644 --- a/roots.c +++ b/roots.c @@ -287,8 +287,8 @@ int format_volume(const char* volume) { Volume* v = volume_for_path(volume); if (v == NULL) { // no /sdcard? let's assume /data/media - if (strstr(path, "/sdcard") == path && is_data_media()) { - return format_unknown_device(v->device, volume, NULL); + if (strstr(volume, "/sdcard") == volume && is_data_media()) { + return format_unknown_device(NULL, volume, NULL); } // silent failure for sd-ext if (strcmp(volume, "/sd-ext") == 0)