From a7334f5837fcc417173254707bc8acfc84120b47 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 27 Apr 2021 21:17:22 +0200 Subject: ghwdump: display help for -h or --help --- ghw/ghwdump.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ghw/ghwdump.c b/ghw/ghwdump.c index fe74e5f9a..fa385af52 100644 --- a/ghw/ghwdump.c +++ b/ghw/ghwdump.c @@ -163,6 +163,14 @@ main (int argc, char **argv) signal_set = NULL; filter_done = 0; + /* Disp help if there is only an help option. */ + if (argc == 2 + && (strcmp (argv[1], "--help") == 0 || strcmp (argv[1], "-h") == 0)) + { + usage (); + exit (0); + } + while (1) { int c; -- cgit v1.2.3