diff options
author | Elliott Hughes <enh@google.com> | 2015-04-28 17:24:24 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-04-29 21:14:56 -0700 |
commit | 2f5feedf1d705b53e5bf90c8b5207dd91f4522f1 (patch) | |
tree | e2c357667b0e76e6fa5a43c7a7951c872c373e9c /tools | |
parent | f7466f9f2334b0e9025e1c7ecf65b4d04a246b20 (diff) | |
download | bootable_recovery-2f5feedf1d705b53e5bf90c8b5207dd91f4522f1.zip bootable_recovery-2f5feedf1d705b53e5bf90c8b5207dd91f4522f1.tar.gz bootable_recovery-2f5feedf1d705b53e5bf90c8b5207dd91f4522f1.tar.bz2 |
Check all lseek calls succeed.
Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek.
Bug: http://b/20625546
Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b
(cherry picked from commit 7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ota/check-lost+found.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/ota/check-lost+found.c b/tools/ota/check-lost+found.c index cbf7926..8ce12d3 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))) snprintf(fn, sizeof(fn), "%s/%s", kPartitions[i], "dirty"); fd = open(fn, O_WRONLY|O_CREAT, 0444); if (fd >= 0) { // Don't sweat it if we can't write the file. - write(fd, fn, sizeof(fn)); // write, you know, some data + TEMP_FAILURE_RETRY(write(fd, fn, sizeof(fn))); // write, you know, some data close(fd); unlink(fn); } |