diff options
author | Android Build Role Account android-build-prod <android-build-team-robot@google.com> | 2021-03-25 10:07:36 +0000 |
---|---|---|
committer | Android Build Role Account android-build-prod <android-build-team-robot@google.com> | 2021-03-25 10:07:36 +0000 |
commit | 75548accd9594d870fa712e3da2d9f618e38c60e (patch) | |
tree | de292a70ddc2edd6da37d3d9b370debd8b80b88f /common/utils.h | |
parent | 9c7061227a48006b715abc21030bf7cd3038e656 (diff) | |
parent | f1c33f832a626903c5fd7dc61a472685d7427c82 (diff) |
Snap for 7234866 from f1c33f832a626903c5fd7dc61a472685d7427c82 to s-keystone-qcom-release
Change-Id: Ib1ef35430561943fb1741db48297001fe97c328e
Diffstat (limited to 'common/utils.h')
-rw-r--r-- | common/utils.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/utils.h b/common/utils.h index 5f6e4757..9a278eb1 100644 --- a/common/utils.h +++ b/common/utils.h @@ -23,6 +23,7 @@ #include <unistd.h> #include <algorithm> +#include <cstdint> #include <limits> #include <map> #include <memory> @@ -181,6 +182,10 @@ std::string MakePartitionName(const std::string& disk_name, int partition_num); // in |read_only|. Return whether the operation succeeded. bool SetBlockDeviceReadOnly(const std::string& device, bool read_only); +// Reserve |size| bytes on space on |path| by creating a file at |path| and +// write 0s into it. Return true iff both creation and writing succeed. +[[nodiscard]] bool ReserveStorageSpace(const char* path, uint64_t size); + // Synchronously mount or unmount a filesystem. Return true on success. // When mounting, it will attempt to mount the device as the passed filesystem // type |type|, with the passed |flags| options. If |type| is empty, "ext2", |