summaryrefslogtreecommitdiffstats
path: root/minzip/Zip.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-29 02:24:24 +0200
committerElliott Hughes <enh@google.com>2015-04-30 06:14:56 +0200
commit2f5feedf1d705b53e5bf90c8b5207dd91f4522f1 (patch)
treee2c357667b0e76e6fa5a43c7a7951c872c373e9c /minzip/Zip.c
parentStop using adb_strtok, and check argument validity. (diff)
downloadandroid_bootable_recovery-2f5feedf1d705b53e5bf90c8b5207dd91f4522f1.tar
android_bootable_recovery-2f5feedf1d705b53e5bf90c8b5207dd91f4522f1.tar.gz
android_bootable_recovery-2f5feedf1d705b53e5bf90c8b5207dd91f4522f1.tar.bz2
android_bootable_recovery-2f5feedf1d705b53e5bf90c8b5207dd91f4522f1.tar.lz
android_bootable_recovery-2f5feedf1d705b53e5bf90c8b5207dd91f4522f1.tar.xz
android_bootable_recovery-2f5feedf1d705b53e5bf90c8b5207dd91f4522f1.tar.zst
android_bootable_recovery-2f5feedf1d705b53e5bf90c8b5207dd91f4522f1.zip
Diffstat (limited to '')
-rw-r--r--minzip/Zip.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/minzip/Zip.c b/minzip/Zip.c
index d3ff79be6..40712e03a 100644
--- a/minzip/Zip.c
+++ b/minzip/Zip.c
@@ -675,13 +675,11 @@ static bool writeProcessFunction(const unsigned char *data, int dataLen,
}
ssize_t soFar = 0;
while (true) {
- ssize_t n = write(fd, data+soFar, dataLen-soFar);
+ ssize_t n = TEMP_FAILURE_RETRY(write(fd, data+soFar, dataLen-soFar));
if (n <= 0) {
LOGE("Error writing %zd bytes from zip file from %p: %s\n",
dataLen-soFar, data+soFar, strerror(errno));
- if (errno != EINTR) {
- return false;
- }
+ return false;
} else if (n > 0) {
soFar += n;
if (soFar == dataLen) return true;