diff options
author | Elliott Hughes <enh@google.com> | 2015-03-20 17:05:56 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-03-20 17:05:56 -0700 |
commit | cd67f00e18de1c8d48ddb082ecb902fc42c2bacc (patch) | |
tree | cd431ef29d8fbbe895b1a7ade750dcb9123c507f /init/property_service.cpp | |
parent | bf684148e2f8182079b9483e7ead30d9b93cd020 (diff) | |
download | system_core-cd67f00e18de1c8d48ddb082ecb902fc42c2bacc.zip system_core-cd67f00e18de1c8d48ddb082ecb902fc42c2bacc.tar.gz system_core-cd67f00e18de1c8d48ddb082ecb902fc42c2bacc.tar.bz2 |
Always use strerror to report errno.
Change-Id: Icd18e4bd7dc093c18967f45b99cd451359457b03
Diffstat (limited to 'init/property_service.cpp')
-rw-r--r-- | init/property_service.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/init/property_service.cpp b/init/property_service.cpp index 2031aae..0e03a1d 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -161,7 +161,7 @@ static void write_persistent_property(const char *name, const char *value) snprintf(tempPath, sizeof(tempPath), "%s/.temp.XXXXXX", PERSISTENT_PROPERTY_DIR); fd = mkstemp(tempPath); if (fd < 0) { - ERROR("Unable to write persistent property to temp file %s errno: %d\n", tempPath, errno); + ERROR("Unable to write persistent property to temp file %s: %s\n", tempPath, strerror(errno)); return; } write(fd, value, strlen(value)); @@ -289,15 +289,15 @@ void handle_property_set_fd() close(s); return; } else if (nr < 0) { - ERROR("sys_prop: error waiting for uid=%d to send property message. err=%d %s\n", cr.uid, errno, strerror(errno)); + ERROR("sys_prop: error waiting for uid=%d to send property message: %s\n", cr.uid, strerror(errno)); close(s); return; } r = TEMP_FAILURE_RETRY(recv(s, &msg, sizeof(msg), MSG_DONTWAIT)); if(r != sizeof(prop_msg)) { - ERROR("sys_prop: mis-match msg size received: %d expected: %zu errno: %d\n", - r, sizeof(prop_msg), errno); + ERROR("sys_prop: mis-match msg size received: %d expected: %zu: %s\n", + r, sizeof(prop_msg), strerror(errno)); close(s); return; } |