diff options
author | Tao Bao <tbao@google.com> | 2018-07-12 23:07:31 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-07-12 23:07:31 +0000 |
commit | 90c9e4f55c5a2fcb24cd921356bc25ad6ea9fc45 (patch) | |
tree | 8745ee7e013df3e0cf9fb8373d0bc66cf7453906 /applypatch/applypatch.cpp | |
parent | a0b2aad0f85473ceb47a5eea3ab503680d957af3 (diff) | |
parent | 49750f15ed2db55247cc03170fec1eed617d9454 (diff) | |
download | android_bootable_recovery-90c9e4f55c5a2fcb24cd921356bc25ad6ea9fc45.tar.gz android_bootable_recovery-90c9e4f55c5a2fcb24cd921356bc25ad6ea9fc45.tar.bz2 android_bootable_recovery-90c9e4f55c5a2fcb24cd921356bc25ad6ea9fc45.zip |
Merge "applypatch: Fix the return type of FreeSpaceForFile()."
Diffstat (limited to 'applypatch/applypatch.cpp')
-rw-r--r-- | applypatch/applypatch.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp index eb0a2a7b..13e4b1ae 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"; |