chiark / gitweb /
use no_argument, required_argument, optional_argument in longopts
[elogind.git] / extras / volume_id / vol_id.c
index b47d6a4ecb1792819d2ba961542291c542cda3d2..0137b84fbeac91e8a51878b057c8e4bafe82bb42 100644 (file)
@@ -111,16 +111,16 @@ static int all_probers(volume_id_probe_fn_t probe_fn,
 int main(int argc, char *argv[])
 {
        static const struct option options[] = {
-               { "label", 0, NULL, 'l' },
-               { "label-raw", 0, NULL, 'L' },
-               { "uuid", 0, NULL, 'u' },
-               { "type", 0, NULL, 't' },
-               { "export", 0, NULL, 'x' },
-               { "skip-raid", 0, NULL, 's' },
-               { "probe-all", 0, NULL, 'a' },
-               { "offset", 2, NULL, 'o' },
-               { "debug", 0, NULL, 'd' },
-               { "help", 0, NULL, 'h' },
+               { "label", no_argument, NULL, 'l' },
+               { "label-raw", no_argument, NULL, 'L' },
+               { "uuid", no_argument, NULL, 'u' },
+               { "type", no_argument, NULL, 't' },
+               { "export", no_argument, NULL, 'x' },
+               { "skip-raid", no_argument, NULL, 's' },
+               { "probe-all", no_argument, NULL, 'a' },
+               { "offset", optional_argument, NULL, 'o' },
+               { "debug", no_argument, NULL, 'd' },
+               { "help", no_argument, NULL, 'h' },
                {}
        };