Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl2/lvm2/dist/daemons/clvmd Don't use %m in format...
details: https://anonhg.NetBSD.org/src/rev/ea5c2e14195d
branches: trunk
changeset: 341506:ea5c2e14195d
user: dholland <dholland%NetBSD.org@localhost>
date: Mon Nov 09 00:53:57 2015 +0000
description:
Don't use %m in format strings sent to printf.
diffstat:
external/gpl2/lvm2/dist/daemons/clvmd/clvmd.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diffs (67 lines):
diff -r 10930752ae77 -r ea5c2e14195d external/gpl2/lvm2/dist/daemons/clvmd/clvmd.c
--- a/external/gpl2/lvm2/dist/daemons/clvmd/clvmd.c Sun Nov 08 23:25:17 2015 +0000
+++ b/external/gpl2/lvm2/dist/daemons/clvmd/clvmd.c Mon Nov 09 00:53:57 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clvmd.c,v 1.1.1.3 2009/12/02 00:27:05 haad Exp $ */
+/* $NetBSD: clvmd.c,v 1.2 2015/11/09 00:53:57 dholland Exp $ */
/*
* Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved.
@@ -924,12 +924,13 @@
if (dup2(devnull, 0) < 0 || dup2(devnull, 1) < 0
|| dup2(devnull, 2) < 0) {
+ int e = errno;
perror("Error setting terminal FDs to /dev/null");
- log_error("Error setting terminal FDs to /dev/null: %m");
+ log_error("Error setting terminal FDs to /dev/null: %s", strerror(e));
exit(5);
}
if (chdir("/")) {
- log_error("Error setting current directory to /: %m");
+ log_error("Error setting current directory to /: %s", strerror(e));
exit(6);
}
@@ -1492,7 +1493,7 @@
if (write_status < 0 &&
(errno == EINTR || errno == EAGAIN))
continue;
- log_error("Error sending to pipe: %m\n");
+ log_error("Error sending to pipe: %s\n", strerror(errno));
break;
} while(1);
@@ -1525,7 +1526,7 @@
if (write_status < 0 &&
(errno == EINTR || errno == EAGAIN))
continue;
- log_error("Error sending to pipe: %m\n");
+ log_error("Error sending to pipe: %s\n", strerror(errno));
break;
} while(1);
next_pre:
@@ -1934,7 +1935,7 @@
unlink(CLVMD_SOCKNAME);
local_socket = socket(PF_UNIX, SOCK_STREAM, 0);
if (local_socket < 0) {
- log_error("Can't create local socket: %m");
+ log_error("Can't create local socket: %s", strerror(errno));
return -1;
}
/* Set Close-on-exec & non-blocking */
@@ -1945,12 +1946,12 @@
memcpy(sockaddr.sun_path, CLVMD_SOCKNAME, sizeof(CLVMD_SOCKNAME));
sockaddr.sun_family = AF_UNIX;
if (bind(local_socket, (struct sockaddr *) &sockaddr, sizeof(sockaddr))) {
- log_error("can't bind local socket: %m");
+ log_error("can't bind local socket: %s", strerror(errno));
close(local_socket);
return -1;
}
if (listen(local_socket, 1) != 0) {
- log_error("listen local: %m");
+ log_error("listen local: %s", strerror(errno));
close(local_socket);
return -1;
}
Home |
Main Index |
Thread Index |
Old Index