aboutsummaryrefslogtreecommitdiffstats
path: root/ghw
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-04-27 21:17:22 +0200
committerTristan Gingold <tgingold@free.fr>2021-04-27 21:17:22 +0200
commita7334f5837fcc417173254707bc8acfc84120b47 (patch)
tree548b217308aa5c99a3abacae491aee13ff04cac6 /ghw
parent94d4ef5976f9bd15e4253200b0577a7a86e0bc22 (diff)
downloadghdl-a7334f5837fcc417173254707bc8acfc84120b47.tar.gz
ghdl-a7334f5837fcc417173254707bc8acfc84120b47.tar.bz2
ghdl-a7334f5837fcc417173254707bc8acfc84120b47.zip
ghwdump: display help for -h or --help
Diffstat (limited to 'ghw')
-rw-r--r--ghw/ghwdump.c8
1 files changed, 8 insertions, 0 deletions
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;