]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hexdump: certain long options should not accept arguments
authorPhil Ruffwind <rf@rufflewind.com>
Sun, 6 Mar 2016 18:45:02 +0000 (13:45 -0500)
committerPhil Ruffwind <rf@rufflewind.com>
Sun, 6 Mar 2016 18:47:32 +0000 (13:47 -0500)
As documented in the manual and the usage info, the long options
--one-byte-char, --canonical, and --two-bytes-octal should not accept
any arguments.

Signed-off-by: Phil Ruffwind <rf@rufflewind.com>
text-utils/hexdump.c

index cc1fdf1b8bf79cc75ebd177e15e78740c2fb486f..9d26c4e48053dd967eca5a098583c1edf78a3cdd 100644 (file)
@@ -66,10 +66,10 @@ parse_args(int argc, char **argv, struct hexdump *hex)
 
        static const struct option longopts[] = {
                {"one-byte-octal", no_argument, NULL, 'b'},
-               {"one-byte-char", required_argument, NULL, 'c'},
-               {"canonical", required_argument, NULL, 'C'},
+               {"one-byte-char", no_argument, NULL, 'c'},
+               {"canonical", no_argument, NULL, 'C'},
                {"two-bytes-decimal", no_argument, NULL, 'd'},
-               {"two-bytes-octal", required_argument, NULL, 'o'},
+               {"two-bytes-octal", no_argument, NULL, 'o'},
                {"two-bytes-hex", no_argument, NULL, 'x'},
                {"format", required_argument, NULL, 'e'},
                {"format-file", required_argument, NULL, 'f'},