Merge "zip_archive: Improve error message on fallocate failure."
am: 704d818ec1
Change-Id: Ic1ab5e824dcc2b6a78e8ceb29732185ad5da1987
This commit is contained in:
commit
388a65d146
|
@ -825,8 +825,9 @@ class FileWriter : public Writer {
|
|||
// disk does not have enough space.
|
||||
result = TEMP_FAILURE_RETRY(fallocate(fd, 0, current_offset, declared_length));
|
||||
if (result == -1 && errno == ENOSPC) {
|
||||
ALOGW("Zip: unable to allocate space for file to %" PRId64 ": %s",
|
||||
static_cast<int64_t>(declared_length + current_offset), strerror(errno));
|
||||
ALOGW("Zip: unable to allocate %" PRId64 " bytes at offset %" PRId64 " : %s",
|
||||
static_cast<int64_t>(declared_length), static_cast<int64_t>(current_offset),
|
||||
strerror(errno));
|
||||
return std::unique_ptr<FileWriter>(nullptr);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue