summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-05-29 08:54:30 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2015-05-29 08:54:30 +0200
commitfe47833b095441d75628b6d26c2f9908806c892b (patch)
tree475c8c19a659479b3699ce98c16de7c081d5770d
parentam 127ab1fc: resolved conflicts for merge of 158e11d6 to mnc-dev-plus-aosp (diff)
parentam eec204be: am 74f5e0e0: Merge "Use f_bavail to calculate free space" (diff)
downloadandroid_bootable_recovery-fe47833b095441d75628b6d26c2f9908806c892b.tar
android_bootable_recovery-fe47833b095441d75628b6d26c2f9908806c892b.tar.gz
android_bootable_recovery-fe47833b095441d75628b6d26c2f9908806c892b.tar.bz2
android_bootable_recovery-fe47833b095441d75628b6d26c2f9908806c892b.tar.lz
android_bootable_recovery-fe47833b095441d75628b6d26c2f9908806c892b.tar.xz
android_bootable_recovery-fe47833b095441d75628b6d26c2f9908806c892b.tar.zst
android_bootable_recovery-fe47833b095441d75628b6d26c2f9908806c892b.zip
-rw-r--r--applypatch/applypatch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/applypatch/applypatch.c b/applypatch/applypatch.c
index 6f02a38ee..2358d4292 100644
--- a/applypatch/applypatch.c
+++ b/applypatch/applypatch.c
@@ -662,7 +662,7 @@ size_t FreeSpaceForFile(const char* filename) {
printf("failed to statfs %s: %s\n", filename, strerror(errno));
return -1;
}
- return sf.f_bsize * sf.f_bfree;
+ return sf.f_bsize * sf.f_bavail;
}
int CacheSizeCheck(size_t bytes) {