chiark / gitweb /
volume_id: add dbg() as noop to check for compile errors
[elogind.git] / udev / udevadm-test.c
index b6fccf34e7070c7be799cd08885b7257c6eab266..f4b0125d3cdbf28d2e39fb6975aca820dd6460b4 100644 (file)
@@ -33,7 +33,7 @@
 
 static int import_uevent_var(struct udev *udev, const char *devpath)
 {
-       char path[PATH_SIZE];
+       char path[UTIL_PATH_SIZE];
        static char value[4096]; /* must stay, used with putenv */
        ssize_t size;
        int fd;
@@ -83,10 +83,10 @@ int udevadm_test(struct udev *udev, int argc, char *argv[])
        int rc = 0;
 
        static const struct option options[] = {
-               { "action", 1, NULL, 'a' },
-               { "subsystem", 1, NULL, 's' },
-               { "force", 0, NULL, 'f' },
-               { "help", 0, NULL, 'h' },
+               { "action", required_argument, NULL, 'a' },
+               { "subsystem", required_argument, NULL, 's' },
+               { "force", no_argument, NULL, 'f' },
+               { "help", no_argument, NULL, 'h' },
                {}
        };
 
@@ -189,7 +189,7 @@ int udevadm_test(struct udev *udev, int argc, char *argv[])
                struct name_entry *name_loop;
 
                list_for_each_entry(name_loop, &udevice->run_list, node) {
-                       char program[PATH_SIZE];
+                       char program[UTIL_PATH_SIZE];
 
                        util_strlcpy(program, name_loop->name, sizeof(program));
                        udev_rules_apply_format(udevice, program, sizeof(program));