summaryrefslogtreecommitdiffstats
path: root/applypatch/applypatch.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-07-13 01:52:53 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-07-13 01:52:53 +0200
commitc9f676bc64ac61dce0bb8fe2717a377df0095fb4 (patch)
tree82e45ba2754f0c80a16f192f6c02a7ba7883451e /applypatch/applypatch.cpp
parentMerge "applypatch: Switch freecache.cpp to libbase logging." (diff)
parentMerge "applypatch: Fix the return type of FreeSpaceForFile()." (diff)
downloadandroid_bootable_recovery-c9f676bc64ac61dce0bb8fe2717a377df0095fb4.tar
android_bootable_recovery-c9f676bc64ac61dce0bb8fe2717a377df0095fb4.tar.gz
android_bootable_recovery-c9f676bc64ac61dce0bb8fe2717a377df0095fb4.tar.bz2
android_bootable_recovery-c9f676bc64ac61dce0bb8fe2717a377df0095fb4.tar.lz
android_bootable_recovery-c9f676bc64ac61dce0bb8fe2717a377df0095fb4.tar.xz
android_bootable_recovery-c9f676bc64ac61dce0bb8fe2717a377df0095fb4.tar.zst
android_bootable_recovery-c9f676bc64ac61dce0bb8fe2717a377df0095fb4.zip
Diffstat (limited to 'applypatch/applypatch.cpp')
-rw-r--r--applypatch/applypatch.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp
index eb0a2a7b5..13e4b1ae0 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -23,7 +23,6 @@
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
-#include <sys/statfs.h>
#include <sys/types.h>
#include <unistd.h>
@@ -421,15 +420,6 @@ static size_t FileSink(const unsigned char* data, size_t len, int fd) {
return done;
}
-size_t FreeSpaceForFile(const std::string& filename) {
- struct statfs sf;
- if (statfs(filename.c_str(), &sf) != 0) {
- PLOG(ERROR) << "Failed to statfs " << filename;
- return -1;
- }
- return sf.f_bsize * sf.f_bavail;
-}
-
int CacheSizeCheck(size_t bytes) {
if (MakeFreeSpaceOnCache(bytes) < 0) {
LOG(ERROR) << "Failed to make " << bytes << " bytes available on /cache";