summaryrefslogtreecommitdiffstats
path: root/applypatch
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-08-16 07:44:51 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-16 07:44:51 -0700
commitbaf6e35473ee5d0fd34006cd4f821129845b1d31 (patch)
treec90d3a848663402c9d77db36088aeb09fa236095 /applypatch
parent8101125ee5068aff91f98c042660cb29576b8612 (diff)
parentc080bc549aaf272c77fe7903e52c2a2c0d8de1bb (diff)
downloadbootable_recovery-baf6e35473ee5d0fd34006cd4f821129845b1d31.zip
bootable_recovery-baf6e35473ee5d0fd34006cd4f821129845b1d31.tar.gz
bootable_recovery-baf6e35473ee5d0fd34006cd4f821129845b1d31.tar.bz2
am c080bc54: am fbd7ae7a: am 201cd466: remove shadowed variable declaration
Merge commit 'c080bc549aaf272c77fe7903e52c2a2c0d8de1bb' * commit 'c080bc549aaf272c77fe7903e52c2a2c0d8de1bb': remove shadowed variable declaration
Diffstat (limited to 'applypatch')
-rw-r--r--applypatch/applypatch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/applypatch/applypatch.c b/applypatch/applypatch.c
index 1ce7b5d..1060913 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);