summaryrefslogtreecommitdiff
path: root/udevsend.c
diff options
context:
space:
mode:
authorMarco d'Itri <md@Linux.IT>2005-11-07 18:44:18 +0100
committerKay Sievers <kay.sievers@suse.de>2005-11-07 18:44:18 +0100
commitff3e4bed21aaff673284f2e024da26c1e39cfda6 (patch)
tree41d3656f4ec95d0b3d7cc4d510501b7a2529c5b1 /udevsend.c
parentb6d474506f8935084e423f78035ea7206d4c3da0 (diff)
add strerror() to error logs
Diffstat (limited to 'udevsend.c')
-rw-r--r--udevsend.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/udevsend.c b/udevsend.c
index 29d5bc155e..d0cfc2af53 100644
--- a/udevsend.c
+++ b/udevsend.c
@@ -71,17 +71,17 @@ static int start_daemon(void)
/* daemon with empty environment */
close(sock);
execve(UDEVD_BIN, argv, envp);
- err("exec of daemon failed");
+ err("exec of daemon failed: %s", strerror(errno));
_exit(1);
case -1:
- err("fork of daemon failed");
+ err("fork of daemon failed: %s", strerror(errno));
return -1;
default:
exit(0);
}
break;
case -1:
- err("fork of helper failed");
+ err("fork of helper failed: %s", strerror(errno));
return -1;
default:
waitpid(pid, NULL, 0);
@@ -110,7 +110,7 @@ int main(int argc, char *argv[], char *envp[])
sock = socket(AF_LOCAL, SOCK_DGRAM, 0);
if (sock == -1) {
- err("error getting socket");
+ err("error getting socket: %s", strerror(errno));
goto exit;
}
@@ -170,7 +170,7 @@ int main(int argc, char *argv[], char *envp[])
}
if (errno != ECONNREFUSED) {
- err("error sending message (%s)", strerror(errno));
+ err("error sending message: %s", strerror(errno));
goto exit;
}