summaryrefslogtreecommitdiff
path: root/udev/udevadm-control.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-10-09 22:52:03 +0200
committerKay Sievers <kay.sievers@vrfy.org>2011-10-09 22:52:03 +0200
commit5cc4112e6d326436dab7476ccc17588d42bf782f (patch)
tree816058f250f968e456a6b86443c837d258b47003 /udev/udevadm-control.c
parent7944a13a2b8516d5fa354703789f5988cb4299b6 (diff)
udevadm: control - use /run/udev/control socket instead of abstract namespace one
Diffstat (limited to 'udev/udevadm-control.c')
-rw-r--r--udev/udevadm-control.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/udev/udevadm-control.c b/udev/udevadm-control.c
index b500d75a4e..130a71b3d0 100644
--- a/udev/udevadm-control.c
+++ b/udev/udevadm-control.c
@@ -66,7 +66,7 @@ static int adm_control(struct udev *udev, int argc, char *argv[])
return 1;
}
- uctrl = udev_ctrl_new_from_socket(udev, UDEV_CTRL_SOCK_PATH);
+ uctrl = udev_ctrl_new(udev);
if (uctrl == NULL)
return 2;
@@ -157,6 +157,11 @@ static int adm_control(struct udev *udev, int argc, char *argv[])
break;
}
}
+
+ if (argv[optind] != NULL)
+ fprintf(stderr, "unknown option\n");
+ else if (optind == 1)
+ fprintf(stderr, "missing option\n");
out:
udev_ctrl_unref(uctrl);
return rc;