fiemap_writer: Use fallocate64

This is necessary for cf_x86.

Test: gsi_tool install
Change-Id: Ifb1afc149f76a98e9db8f9d71a74542416113590
This commit is contained in:
Paul Trautrim 2019-02-25 16:59:26 +09:00
parent f80c326d2e
commit 3d001e7ebb
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ static bool AllocateFile(int file_fd, const std::string& file_path, uint64_t blo
// don't come back unwritten. Return from this function with the kernel file offset set to 0.
// If the filesystem is f2fs, then we also PIN the file on disk to make sure the blocks
// aren't moved around.
if (fallocate(file_fd, FALLOC_FL_ZERO_RANGE, 0, file_size)) {
if (fallocate64(file_fd, FALLOC_FL_ZERO_RANGE, 0, file_size)) {
PLOG(ERROR) << "Failed to allocate space for file: " << file_path << " size: " << file_size;
return false;
}