diff options
author | Doug Zongker <dougz@android.com> | 2010-08-16 16:44:51 +0200 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-08-16 16:44:51 +0200 |
commit | baf6e35473ee5d0fd34006cd4f821129845b1d31 (patch) | |
tree | c90d3a848663402c9d77db36088aeb09fa236095 /applypatch/applypatch.c | |
parent | Changes to work with updated make_ext4fs tool that supports creating sparse images. (diff) | |
parent | am fbd7ae7a: am 201cd466: remove shadowed variable declaration (diff) | |
download | android_bootable_recovery-baf6e35473ee5d0fd34006cd4f821129845b1d31.tar android_bootable_recovery-baf6e35473ee5d0fd34006cd4f821129845b1d31.tar.gz android_bootable_recovery-baf6e35473ee5d0fd34006cd4f821129845b1d31.tar.bz2 android_bootable_recovery-baf6e35473ee5d0fd34006cd4f821129845b1d31.tar.lz android_bootable_recovery-baf6e35473ee5d0fd34006cd4f821129845b1d31.tar.xz android_bootable_recovery-baf6e35473ee5d0fd34006cd4f821129845b1d31.tar.zst android_bootable_recovery-baf6e35473ee5d0fd34006cd4f821129845b1d31.zip |
Diffstat (limited to 'applypatch/applypatch.c')
-rw-r--r-- | applypatch/applypatch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/applypatch/applypatch.c b/applypatch/applypatch.c index 1ce7b5dab..106091386 100644 --- a/applypatch/applypatch.c +++ b/applypatch/applypatch.c @@ -737,7 +737,8 @@ int applypatch(const char* source_filename, int enough_space = 0; if (retry > 0) { size_t free_space = FreeSpaceForFile(target_fs); - int enough_space = + enough_space = + (free_space > (256 << 10)) && // 256k (two-block) minimum (free_space > (target_size * 3 / 2)); // 50% margin of error printf("target %ld bytes; free space %ld bytes; retry %d; enough %d\n", (long)target_size, (long)free_space, retry, enough_space); |