summaryrefslogtreecommitdiffstats
path: root/cmds/installd
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-01-22 00:13:42 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-01-22 00:13:42 -0800
commitf1e484acb594a726fb57ad0ae4cfe902c7f35858 (patch)
tree99d2b34512f0dc2ae67666e756c1cfcd331e5fe3 /cmds/installd
parent22f7dfd23490a3de2f21ff96949ba47003aac8f8 (diff)
downloadframeworks_base-f1e484acb594a726fb57ad0ae4cfe902c7f35858.zip
frameworks_base-f1e484acb594a726fb57ad0ae4cfe902c7f35858.tar.gz
frameworks_base-f1e484acb594a726fb57ad0ae4cfe902c7f35858.tar.bz2
auto import from //branches/cupcake/...@127436
Diffstat (limited to 'cmds/installd')
-rw-r--r--cmds/installd/commands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index ab7d67a..a3651b2 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -118,12 +118,12 @@ int free_cache(int free_size)
if (avail < 0) return -1;
LOGI("free_cache(%d) avail %d\n", free_size, avail);
- if (avail > free_size) return 0;
+ if (avail >= free_size) return 0;
d = opendir(PKG_DIR_PREFIX);
if (d == NULL) {
LOGE("cannot open %s\n", PKG_DIR_PREFIX);
- return 0;
+ return -1;
}
dfd = dirfd(d);
@@ -144,7 +144,7 @@ int free_cache(int free_size)
close(subfd);
avail = disk_free();
- if (avail > free_size) {
+ if (avail >= free_size) {
closedir(d);
return 0;
}