summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-04-22 04:11:18 +0200
committerKay Sievers <kay.sievers@vrfy.org>2009-04-22 04:11:18 +0200
commit3111a33e952a20d8bb60cb37e4ad0986b555f4e1 (patch)
tree84a0e91473b8fa34f85dd9669e89e91a530409f8 /udev
parente14bdd88e9796ec3c70966dd1899add6667431f5 (diff)
udevadm: monitor - print error if we can not bind to socket
Diffstat (limited to 'udev')
-rw-r--r--udev/udevadm-monitor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c
index d8ec066467..b5897b9ff8 100644
--- a/udev/udevadm-monitor.c
+++ b/udev/udevadm-monitor.c
@@ -127,10 +127,12 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[])
if (print_udev) {
udev_monitor = udev_monitor_new_from_netlink(udev, "udev");
if (udev_monitor == NULL) {
+ fprintf(stderr, "error: unable to create netlink socket\n");
rc = 1;
goto out;
}
if (udev_monitor_enable_receiving(udev_monitor) < 0) {
+ fprintf(stderr, "error: unable to subscribe to udev events\n");
rc = 2;
goto out;
}
@@ -139,11 +141,12 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[])
if (print_kernel) {
kernel_monitor = udev_monitor_new_from_netlink(udev, "kernel");
if (kernel_monitor == NULL) {
- fprintf(stderr, "unable to subscribe to kernel events\n");
+ fprintf(stderr, "error: unable to create netlink socket\n");
rc = 3;
goto out;
}
if (udev_monitor_enable_receiving(kernel_monitor) < 0) {
+ fprintf(stderr, "error: unable to subscribe to kernel events\n");
rc = 4;
goto out;
}