summaryrefslogtreecommitdiff
path: root/udev/udevadm-control.c
diff options
context:
space:
mode:
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;