Merge "Explicitly cast to 64bit integer when calculating filesystem size" am: 10a8797ce0 am: 83f5476b3d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1586546 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ibe4b041bf28881c21a683ca6d9c42944e098c928
This commit is contained in:
commit
4707ce169d
1 changed files with 1 additions and 1 deletions
|
|
@ -194,7 +194,7 @@ bool fs_mgr_filesystem_has_space(const std::string& mount_point) {
|
|||
static constexpr unsigned long kSizeThreshold = 8 * 1024 * 1024; // 8MB
|
||||
|
||||
return (vst.f_bfree >= (vst.f_blocks * kPercentThreshold / 100)) &&
|
||||
(vst.f_bfree * vst.f_bsize) >= kSizeThreshold;
|
||||
(static_cast<uint64_t>(vst.f_bfree) * vst.f_frsize) >= kSizeThreshold;
|
||||
}
|
||||
|
||||
const auto kPhysicalDevice = "/dev/block/by-name/"s;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue