summaryrefslogtreecommitdiffstats
path: root/applypatch/include
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-07-13 02:14:44 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-07-13 02:14:44 +0200
commit22c5aed89e6bfe9cdfe4ddedb3f448d37ac3ffb7 (patch)
tree82e45ba2754f0c80a16f192f6c02a7ba7883451e /applypatch/include
parentMerge "applypatch: Switch freecache.cpp to libbase logging." am: a0b2aad0f8 (diff)
parentMerge "applypatch: Fix the return type of FreeSpaceForFile()." (diff)
downloadandroid_bootable_recovery-22c5aed89e6bfe9cdfe4ddedb3f448d37ac3ffb7.tar
android_bootable_recovery-22c5aed89e6bfe9cdfe4ddedb3f448d37ac3ffb7.tar.gz
android_bootable_recovery-22c5aed89e6bfe9cdfe4ddedb3f448d37ac3ffb7.tar.bz2
android_bootable_recovery-22c5aed89e6bfe9cdfe4ddedb3f448d37ac3ffb7.tar.lz
android_bootable_recovery-22c5aed89e6bfe9cdfe4ddedb3f448d37ac3ffb7.tar.xz
android_bootable_recovery-22c5aed89e6bfe9cdfe4ddedb3f448d37ac3ffb7.tar.zst
android_bootable_recovery-22c5aed89e6bfe9cdfe4ddedb3f448d37ac3ffb7.zip
Diffstat (limited to 'applypatch/include')
-rw-r--r--applypatch/include/applypatch/applypatch.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/applypatch/include/applypatch/applypatch.h b/applypatch/include/applypatch/applypatch.h
index 92db59c3a..88659b86a 100644
--- a/applypatch/include/applypatch/applypatch.h
+++ b/applypatch/include/applypatch/applypatch.h
@@ -40,10 +40,6 @@ using SinkFn = std::function<size_t(const unsigned char*, size_t)>;
int ShowLicenses();
-// Returns the amount of free space (in bytes) on the filesystem containing filename, or -1 on
-// error. filename must exist.
-size_t FreeSpaceForFile(const std::string& filename);
-
// Checks whether /cache partition has at least 'bytes'-byte free space. Returns 0 on having
// sufficient space.
int CacheSizeCheck(size_t bytes);
@@ -119,8 +115,8 @@ int ApplyImagePatch(const unsigned char* old_data, size_t old_size, const Value&
int MakeFreeSpaceOnCache(size_t bytes_needed);
-// Removes the files in |dirname| until we have at least |bytes_needed| bytes of free space on
-// the partition. The size of the free space is returned by calling |space_checker|.
+// Removes the files in |dirname| until we have at least |bytes_needed| bytes of free space on the
+// partition. |space_checker| should return the size of the free space, or -1 on error.
bool RemoveFilesInDirectory(size_t bytes_needed, const std::string& dirname,
- const std::function<size_t(const std::string&)>& space_checker);
+ const std::function<int64_t(const std::string&)>& space_checker);
#endif