Merge "Move perfprofd to late_start class."
diff --git a/debuggerd/debuggerd.cpp b/debuggerd/debuggerd.cpp
index 039b8ec..b84a4e5 100644
--- a/debuggerd/debuggerd.cpp
+++ b/debuggerd/debuggerd.cpp
@@ -279,7 +279,7 @@
char ehdr[EI_NIDENT];
ssize_t bytes = TEMP_FAILURE_RETRY(read(fd, &ehdr, sizeof(ehdr)));
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
if (bytes != (ssize_t) sizeof(ehdr) || memcmp(ELFMAG, ehdr, SELFMAG) != 0) {
return false;
}
@@ -304,14 +304,14 @@
if (TEMP_FAILURE_RETRY(write(sock_fd, &msg, sizeof(msg))) != (ssize_t) sizeof(msg)) {
ALOGE("Failed to write request to debuggerd32 socket: %s", strerror(errno));
- TEMP_FAILURE_RETRY(close(sock_fd));
+ close(sock_fd);
return;
}
char ack;
if (TEMP_FAILURE_RETRY(read(sock_fd, &ack, 1)) == -1) {
ALOGE("Failed to read ack from debuggerd32 socket: %s", strerror(errno));
- TEMP_FAILURE_RETRY(close(sock_fd));
+ close(sock_fd);
return;
}
@@ -338,7 +338,7 @@
break;
}
}
- TEMP_FAILURE_RETRY(close(sock_fd));
+ close(sock_fd);
}
#endif
@@ -365,7 +365,7 @@
ALOGE("debuggerd: Not allowed to redirect action %d to 32 bit debuggerd\n",
request.action);
}
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
return;
}
#endif
diff --git a/fs_mgr/fs_mgr.c b/fs_mgr/fs_mgr.c
index d5e94ac..bb2bed2 100644
--- a/fs_mgr/fs_mgr.c
+++ b/fs_mgr/fs_mgr.c
@@ -203,7 +203,7 @@
}
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 63b23b9..81c7c9a 100644
--- a/fs_mgr/fs_mgr_verity.c
+++ b/fs_mgr/fs_mgr_verity.c
@@ -169,20 +169,20 @@
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 @@
out:
if (device != -1)
- TEMP_FAILURE_RETRY(close(device));
+ close(device);
if (retval != FS_MGR_SETUP_VERITY_SUCCESS) {
free(*signature);
@@ -470,7 +470,7 @@
out:
if (fd != -1) {
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
}
return rc;
@@ -622,7 +622,7 @@
out:
if (fd != -1) {
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
}
return rc;
@@ -670,7 +670,7 @@
out:
if (fd != -1) {
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
}
return rc;
@@ -745,7 +745,7 @@
free(signature);
if (fd != -1) {
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
}
return rc;
@@ -913,7 +913,7 @@
}
if (fd) {
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
}
return rc;
diff --git a/init/util.cpp b/init/util.cpp
index 9c62f68..8216892 100644
--- a/init/util.cpp
+++ b/init/util.cpp
@@ -171,7 +171,7 @@
}
bool okay = android::base::ReadFdToString(fd, content);
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
return okay;
}
@@ -185,7 +185,7 @@
if (result == -1) {
NOTICE("write_file: Unable to write to '%s': %s\n", path, strerror(errno));
}
- TEMP_FAILURE_RETRY(close(fd));
+ close(fd);
return result;
}
diff --git a/libcutils/debugger.c b/libcutils/debugger.c
index 4558719..3407ec3 100644
--- a/libcutils/debugger.c
+++ b/libcutils/debugger.c
@@ -68,7 +68,7 @@
}
if (send_request(sock_fd, &msg, sizeof(msg)) < 0) {
- TEMP_FAILURE_RETRY(close(sock_fd));
+ close(sock_fd);
return -1;
}
@@ -95,7 +95,7 @@
break;
}
}
- TEMP_FAILURE_RETRY(close(sock_fd));
+ close(sock_fd);
return result;
}
@@ -124,6 +124,6 @@
memcpy(pathbuf, buffer, n + 1);
}
}
- TEMP_FAILURE_RETRY(close(sock_fd));
+ close(sock_fd);
return result;
}