diff options
author | Elliott Hughes <enh@google.com> | 2015-05-15 19:16:40 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-05-27 13:27:06 -0700 |
commit | 9fc834377297cb2dcc418e4ce7e38e89dd09812b (patch) | |
tree | 8334eb54465c347db0ad9724ed6274abaed2dfd4 /fs_mgr | |
parent | 93f6cba3ea078186473a448fe018167f4a8dcc5a (diff) | |
download | system_core-9fc834377297cb2dcc418e4ce7e38e89dd09812b.zip system_core-9fc834377297cb2dcc418e4ce7e38e89dd09812b.tar.gz system_core-9fc834377297cb2dcc418e4ce7e38e89dd09812b.tar.bz2 |
Don't use TEMP_FAILURE_RETRY on close in system/core.
Bug: http://b/20501816
Change-Id: I1839b48ee4f891b8431ecb809e37a4566a5b3e50
(cherry picked from commit 47b0134ec2b5e8c8b5b5671cd4a3e41261275532)
Diffstat (limited to 'fs_mgr')
-rw-r--r-- | fs_mgr/fs_mgr.c | 2 | ||||
-rw-r--r-- | fs_mgr/fs_mgr_verity.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/fs_mgr/fs_mgr.c b/fs_mgr/fs_mgr.c index 5f639b7..740f894 100644 --- a/fs_mgr/fs_mgr.c +++ b/fs_mgr/fs_mgr.c @@ -206,7 +206,7 @@ int fs_mgr_set_blk_ro(const char *blockdev) } rc = ioctl(fd, BLKROSET, &ON); - TEMP_FAILURE_RETRY(close(fd)); + close(fd); return rc; } diff --git a/fs_mgr/fs_mgr_verity.c b/fs_mgr/fs_mgr_verity.c index 6ef46ba..cc8c57e 100644 --- a/fs_mgr/fs_mgr_verity.c +++ b/fs_mgr/fs_mgr_verity.c @@ -169,20 +169,20 @@ static int ext4_get_target_device_size(char *blk_device, uint64_t *device_size) if (TEMP_FAILURE_RETRY(lseek64(data_device, 1024, SEEK_SET)) < 0) { ERROR("Error seeking to superblock"); - TEMP_FAILURE_RETRY(close(data_device)); + close(data_device); return -1; } if (TEMP_FAILURE_RETRY(read(data_device, &sb, sizeof(sb))) != sizeof(sb)) { ERROR("Error reading superblock"); - TEMP_FAILURE_RETRY(close(data_device)); + close(data_device); return -1; } ext4_parse_sb(&sb, &info); *device_size = info.len; - TEMP_FAILURE_RETRY(close(data_device)); + close(data_device); return 0; } @@ -301,7 +301,7 @@ static int read_verity_metadata(uint64_t device_size, char *block_device, char * out: if (device != -1) - TEMP_FAILURE_RETRY(close(device)); + close(device); if (retval != FS_MGR_SETUP_VERITY_SUCCESS) { free(*signature); @@ -470,7 +470,7 @@ static int check_verity_restart(const char *fname) out: if (fd != -1) { - TEMP_FAILURE_RETRY(close(fd)); + close(fd); } return rc; @@ -622,7 +622,7 @@ static int write_verity_state(const char *fname, off64_t offset, int32_t mode) out: if (fd != -1) { - TEMP_FAILURE_RETRY(close(fd)); + close(fd); } return rc; @@ -670,7 +670,7 @@ static int read_verity_state(const char *fname, off64_t offset, int *mode) out: if (fd != -1) { - TEMP_FAILURE_RETRY(close(fd)); + close(fd); } return rc; @@ -745,7 +745,7 @@ out: free(signature); if (fd != -1) { - TEMP_FAILURE_RETRY(close(fd)); + close(fd); } return rc; @@ -913,7 +913,7 @@ out: } if (fd) { - TEMP_FAILURE_RETRY(close(fd)); + close(fd); } return rc; |