diff options
author | Elliott Hughes <enh@google.com> | 2015-04-30 06:19:33 +0200 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-30 06:19:33 +0200 |
commit | 34d3a3d074e977cace29797c428795e1de5b3223 (patch) | |
tree | e2c357667b0e76e6fa5a43c7a7951c872c373e9c /minzip/Zip.c | |
parent | am 8c389e9c: Merge "Stop using adb_strtok, and check argument validity." (diff) | |
parent | Merge "Check all lseek calls succeed." (diff) | |
download | android_bootable_recovery-34d3a3d074e977cace29797c428795e1de5b3223.tar android_bootable_recovery-34d3a3d074e977cace29797c428795e1de5b3223.tar.gz android_bootable_recovery-34d3a3d074e977cace29797c428795e1de5b3223.tar.bz2 android_bootable_recovery-34d3a3d074e977cace29797c428795e1de5b3223.tar.lz android_bootable_recovery-34d3a3d074e977cace29797c428795e1de5b3223.tar.xz android_bootable_recovery-34d3a3d074e977cace29797c428795e1de5b3223.tar.zst android_bootable_recovery-34d3a3d074e977cace29797c428795e1de5b3223.zip |
Diffstat (limited to '')
-rw-r--r-- | minzip/Zip.c | 6 |
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; |