]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - text-utils/hexdump.c
wipefs: add --lock and LOCK_BLOCK_DEVICE
[thirdparty/util-linux.git] / text-utils / hexdump.c
index 94c53b8e520e0aba103d811987ca9153e0ee55d3..d7a54be5bd6f8192ac2305b51aabc9d93f62fe51 100644 (file)
@@ -130,12 +130,11 @@ parse_args(int argc, char **argv, struct hexdump *hex)
                        add_fmt(hex_offt, hex);
                        add_fmt("\"%07.7_ax \" 8/2 \"   %04x \" \"\\n\"", hex);
                        break;
+
                case 'h':
                        usage();
                case 'V':
-                       printf(UTIL_LINUX_VERSION);
-                       exit(EXIT_SUCCESS);
-                       break;
+                       print_version(EXIT_SUCCESS);
                default:
                        errtryhelp(EXIT_FAILURE);
                }
@@ -173,10 +172,14 @@ void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -n, --length <length>     interpret only length bytes of input\n"), out);
        fputs(_(" -s, --skip <offset>       skip offset bytes from the beginning\n"), out);
        fputs(_(" -v, --no-squeezing        output identical lines\n"), out);
+
        fputs(USAGE_SEPARATOR, out);
        printf(USAGE_HELP_OPTIONS(27));
-       printf(USAGE_MAN_TAIL("hexdump(1)"));
 
+       fputs(USAGE_ARGUMENTS, out);
+       printf(USAGE_ARG_SIZE(_("<length> and <offset>")));
+
+       printf(USAGE_MAN_TAIL("hexdump(1)"));
        exit(EXIT_SUCCESS);
 }
 
@@ -193,7 +196,7 @@ int main(int argc, char **argv)
        setlocale(LC_ALL, "");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
-       atexit(close_stdout);
+       close_stdout_atexit();
 
        argv += parse_args(argc, argv, hex);