summaryrefslogtreecommitdiffstats
path: root/fuse_sideload.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 02:46:43 +0200
commit7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f (patch)
treee2c357667b0e76e6fa5a43c7a7951c872c373e9c /fuse_sideload.c
parentMerge "Stop using adb_strtok, and check argument validity." (diff)
downloadandroid_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.gz
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.bz2
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.lz
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.xz
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.zst
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.zip
Diffstat (limited to '')
-rw-r--r--fuse_sideload.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/fuse_sideload.c b/fuse_sideload.c
index 1dd84e97a..48e6cc53a 100644
--- a/fuse_sideload.c
+++ b/fuse_sideload.c
@@ -442,14 +442,12 @@ int run_fuse_sideload(struct provider_vtab* vtab, void* cookie,
}
uint8_t request_buffer[sizeof(struct fuse_in_header) + PATH_MAX*8];
for (;;) {
- ssize_t len = read(fd.ffd, request_buffer, sizeof(request_buffer));
- if (len < 0) {
- if (errno != EINTR) {
- perror("read request");
- if (errno == ENODEV) {
- result = -1;
- break;
- }
+ ssize_t len = TEMP_FAILURE_RETRY(read(fd.ffd, request_buffer, sizeof(request_buffer)));
+ if (len == -1) {
+ perror("read request");
+ if (errno == ENODEV) {
+ result = -1;
+ break;
}
continue;
}
@@ -508,7 +506,7 @@ int run_fuse_sideload(struct provider_vtab* vtab, void* cookie,
outhdr.len = sizeof(outhdr);
outhdr.error = result;
outhdr.unique = hdr->unique;
- write(fd.ffd, &outhdr, sizeof(outhdr));
+ TEMP_FAILURE_RETRY(write(fd.ffd, &outhdr, sizeof(outhdr)));
}
}