diff options
Diffstat (limited to 'tools/i2cdump.c')
-rw-r--r-- | tools/i2cdump.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/i2cdump.c b/tools/i2cdump.c index 1082211..d54a7e4 100644 --- a/tools/i2cdump.c +++ b/tools/i2cdump.c @@ -116,16 +116,17 @@ int main(int argc, char *argv[]) int first = 0x00, last = 0xff; /* handle (optional) flags first */ - while ((opt = getopt(argc, argv, "Vafr:y")) != -1) { + while ((opt = getopt(argc, argv, "Vafhr:y")) != -1) { switch (opt) { case 'V': version = 1; break; case 'f': force = 1; break; case 'r': range = optarg; break; case 'y': yes = 1; break; case 'a': all_addrs = 1; break; + case 'h': case '?': help(); - exit(1); + exit(opt == '?'); } } |