diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-06-05 15:03:26 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-06-05 15:03:26 +0100 |
commit | 563a442d63bab474b554453c6c3ccf10e3a5b48d (patch) | |
tree | e47030a2b80c19fa954cc958009360aba15d9c94 /errno.c | |
parent | 3ebe87776f38e07343d79c14bc2dad3560bf5f8f (diff) | |
download | moreutils-563a442d63bab474b554453c6c3ccf10e3a5b48d.tar.gz |
Add --help and add --list to manpage
Diffstat (limited to 'errno.c')
-rw-r--r-- | errno.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -74,10 +74,18 @@ report_from_code(int code) static struct option options[] = { + { "help", 0, NULL, 'h' }, { "list", 0, NULL, 'l' }, }; +static void +usage(void) +{ + printf("Usage: errno [-l] [--list] [keyword]\n"); +} + + int main(int argc, char **argv) { @@ -92,6 +100,10 @@ main(int argc, char **argv) break; switch (c) { + case 'h': + usage(); + return EXIT_SUCCESS; + case 'l': mode = list_mode; break; |