aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorElliott Hughes2015-04-28 19:24:24 -0500
committerElliott Hughes2015-04-29 19:46:43 -0500
commit7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f (patch)
treee2c357667b0e76e6fa5a43c7a7951c872c373e9c /tools
parent8c389e9c769c8632cf16c0794f1e84f49996077c (diff)
downloadplatform-bootable-recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.gz
platform-bootable-recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.xz
platform-bootable-recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.zip
Check all lseek calls succeed.
Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek. Bug: http://b/20625546 Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b
Diffstat (limited to 'tools')
-rw-r--r--tools/ota/check-lost+found.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/ota/check-lost+found.c b/tools/ota/check-lost+found.c
index cbf79262..8ce12d39 100644
--- a/tools/ota/check-lost+found.c
+++ b/tools/ota/check-lost+found.c
@@ -78,7 +78,7 @@ int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
78 snprintf(fn, sizeof(fn), "%s/%s", kPartitions[i], "dirty"); 78 snprintf(fn, sizeof(fn), "%s/%s", kPartitions[i], "dirty");
79 fd = open(fn, O_WRONLY|O_CREAT, 0444); 79 fd = open(fn, O_WRONLY|O_CREAT, 0444);
80 if (fd >= 0) { // Don't sweat it if we can't write the file. 80 if (fd >= 0) { // Don't sweat it if we can't write the file.
81 write(fd, fn, sizeof(fn)); // write, you know, some data 81 TEMP_FAILURE_RETRY(write(fd, fn, sizeof(fn))); // write, you know, some data
82 close(fd); 82 close(fd);
83 unlink(fn); 83 unlink(fn);
84 } 84 }