summaryrefslogtreecommitdiffstats
path: root/hotplug.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-03-16 02:33:25 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-03-16 02:33:25 +0100
commit8e728e62d2c7875dc9291797bff8e19a7340405f (patch)
tree71f639cbc94cea33a783ee903404520b2e0d2694 /hotplug.c
parent9fcc900e301e0c304488b6b83f10c8db5b8f4ce0 (diff)
downloadunitd-8e728e62d2c7875dc9291797bff8e19a7340405f.tar
unitd-8e728e62d2c7875dc9291797bff8e19a7340405f.zip
get rid of perror() calls, use ERROR() instead
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'hotplug.c')
-rw-r--r--hotplug.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hotplug.c b/hotplug.c
index 6583de4..ac54da4 100644
--- a/hotplug.c
+++ b/hotplug.c
@@ -422,13 +422,11 @@ void hotplug(char *rules)
nls.nl_groups = -1;
if ((hotplug_fd.fd = socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT)) == -1) {
- ERROR("Failed to open hotplug socket\n");
- perror("socket");
+ ERROR("Failed to open hotplug socket: %s\n", strerror(errno));
exit(1);
}
if (bind(hotplug_fd.fd, (void *)&nls, sizeof(struct sockaddr_nl))) {
- ERROR("Failed to bind hotplug socket\n");
- perror("socket");
+ ERROR("Failed to bind hotplug socket: %s\n", strerror(errno));
exit(1);
}