From c0970934e2c4ba8e78b5580c12934ca7b7a445cb Mon Sep 17 00:00:00 2001 From: "Koushik K. Dutta" Date: Thu, 25 Mar 2010 23:19:19 -0700 Subject: [PATCH] dont fail on lack of free space. just warn. figure out issue later. allow KEY_BACK --- Android.mk | 2 +- default_recovery_ui.c | 1 + nandroid.c | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Android.mk b/Android.mk index 0b064ff..b96a2af 100644 --- a/Android.mk +++ b/Android.mk @@ -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) diff --git a/default_recovery_ui.c b/default_recovery_ui.c index c6955c0..9a54964 100644 --- a/default_recovery_ui.c +++ b/default_recovery_ui.c @@ -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; } diff --git a/nandroid.c b/nandroid.c index 5b931aa..39569c5 100644 --- a/nandroid.c +++ b/nandroid.c @@ -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);