summaryrefslogtreecommitdiffstats
path: root/libziparchive
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2016-08-10 12:24:05 +0100
committerNarayan Kamath <narayan@google.com>2016-08-10 12:24:05 +0100
commitd5d7abe3d1969ff1848c316c54d3f560947b3626 (patch)
tree8d76a654b12dfdccfaca086d993066abb5c347fc /libziparchive
parentc97b73aa83fc7b80b60d88d856675d4ab502296d (diff)
downloadcore-d5d7abe3d1969ff1848c316c54d3f560947b3626.tar.gz
core-d5d7abe3d1969ff1848c316c54d3f560947b3626.tar.bz2
core-d5d7abe3d1969ff1848c316c54d3f560947b3626.zip
zip_archive: Improve error message on fallocate failure.
Noticed on b/30765660. Change-Id: I1a98f83fef02a7368bdc2e1f8f24a0771eebe468
Diffstat (limited to 'libziparchive')
-rw-r--r--libziparchive/zip_archive.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc
index a2d6fccd1..af6e02c67 100644
--- a/libziparchive/zip_archive.cc
+++ b/libziparchive/zip_archive.cc
@@ -819,8 +819,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);
}
}