platform_bootable_recovery/applypatch
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/applypatch applypatch: Consolidate CacheSizeCheck() and MakeFreeSpaceOnCache(). 2018-07-13 09:42:19 -07:00
Android.bp Disable building libapplypatch on mac 2018-02-17 22:06:31 -08:00
applypatch.cpp applypatch: Consolidate CacheSizeCheck() and MakeFreeSpaceOnCache(). 2018-07-13 09:42:19 -07:00
applypatch_main.cpp applypatch: Add testcases for applypatch executable. 2016-11-01 14:40:14 -07:00
applypatch_modes.cpp edify: Remove VAL_INVALID and move ValueType into Value class. 2018-07-09 23:20:30 -07:00
applypatch_modes.h applypatch: Add testcases for applypatch executable. 2016-11-01 14:40:14 -07:00
bspatch.cpp applypatch: Drop the SHA_CTX parameter in Apply{BSDiff,Image}Patch. 2018-04-20 09:27:50 -07:00
freecache.cpp applypatch: Consolidate CacheSizeCheck() and MakeFreeSpaceOnCache(). 2018-07-13 09:42:19 -07:00
imgdiff.cpp Convert deflate image chunks to raw if the raw data is smaller 2018-05-24 10:49:54 -07:00
imgdiff_main.cpp Add tests for imgdiff. 2016-12-19 16:53:03 -08:00
imgpatch.cpp Remove the debug code for bspatch flakiness 2018-07-11 11:51:43 -07:00
NOTICE Add NOTICE file 2012-04-06 13:51:00 -07:00