dont fail on lack of free space. just warn. figure out issue later. allow KEY_BACK
This commit is contained in:
parent
04159f738f
commit
c0970934e2
@ -26,7 +26,7 @@ LOCAL_MODULE := recovery
|
||||
|
||||
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
||||
|
||||
RECOVERY_VERSION := ClockworkMod Recovery v1.7.8.1
|
||||
RECOVERY_VERSION := ClockworkMod Recovery v1.7.8.3
|
||||
LOCAL_CFLAGS := -DRECOVERY_VERSION="$(RECOVERY_VERSION)"
|
||||
RECOVERY_API_VERSION := 2
|
||||
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
|
||||
|
@ -64,6 +64,7 @@ int device_handle_key(int key_code, int visible) {
|
||||
case KEY_POWER:
|
||||
case KEY_END:
|
||||
case KEY_BACKSPACE:
|
||||
case KEY_BACK:
|
||||
if (!get_allow_toggle_display())
|
||||
return GO_BACK;
|
||||
}
|
||||
|
@ -108,9 +108,10 @@ int nandroid_backup(char* backup_path)
|
||||
struct statfs s;
|
||||
if (0 != (ret = statfs("/sdcard", &s)))
|
||||
return print_and_error("Unable to stat /sdcard\n");
|
||||
long sdcard_free = s.f_bfree * s.f_bsize;
|
||||
long sdcard_free = s.f_bavail * s.f_bsize;
|
||||
if (sdcard_free < 150000000L)
|
||||
return print_and_error("There is not enough free space on the SD Card! At least 150MB is required to create a backup.\n");
|
||||
ui_print("There may not be enough free space to complete backup... continuing...\n");
|
||||
// return print_and_error("There is not enough free space on the SD Card! At least 150MB is required to create a backup.\n");
|
||||
|
||||
char tmp[PATH_MAX];
|
||||
sprintf(tmp, "mkdir -p %s", backup_path);
|
||||
|
Loading…
Reference in New Issue
Block a user