platform_bootable_recovery/updater
Tao Bao 5ee25666cc applypatch: Consolidate CacheSizeCheck() and MakeFreeSpaceOnCache().
They are doing exactly the same thing, except for the slightly different
error return value (1 vs -1).

int CacheSizeCheck(size_t bytes);
int MakeFreeSpaceOnCache(size_t bytes_needed);

This CL consolidates the two functions and uses bool as its return type.

// Checks whether /cache partition has at least 'bytes'-byte free space. Returns true immediately
// if so. Otherwise, it will try to free some space by removing older logs, checks again and
// returns the checking result.
bool CheckAndFreeSpaceOnCache(size_t bytes);

Test: Run recovery_unit_test and recovery_component_test on marlin.
Change-Id: I94a96934d2b18713f8f39ad5aa96a02c98d87963
2018-07-13 09:42:19 -07:00
..
include updater: Add ABORT command. 2018-07-07 04:12:19 +00:00
Android.mk updater: Add Command parsing codes. 2018-06-25 13:39:29 -07:00
blockimg.cpp applypatch: Consolidate CacheSizeCheck() and MakeFreeSpaceOnCache(). 2018-07-13 09:42:19 -07:00
commands.cpp updater: Add ABORT command. 2018-07-07 04:12:19 +00:00
install.cpp applypatch: Consolidate CacheSizeCheck() and MakeFreeSpaceOnCache(). 2018-07-13 09:42:19 -07:00
updater.cpp edify: Rename parse_string to ParseString and let it take std::string. 2018-07-10 06:27:50 +00:00