diff options
Diffstat (limited to 'winsup/utils/gmondump.c')
-rw-r--r-- | winsup/utils/gmondump.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/winsup/utils/gmondump.c b/winsup/utils/gmondump.c index e469f01..ec9db05 100644 --- a/winsup/utils/gmondump.c +++ b/winsup/utils/gmondump.c @@ -46,6 +46,14 @@ OPTIONS are:\n\ exit (where == stderr ? 1 : 0 ); } +void __attribute__ ((__noreturn__)) +usage1 (FILE *where) +{ + fprintf (where, "Usage: %s [OPTIONS] FILENAME...\n", pgm); + + exit (where == stderr ? 1 : 0 ); +} + void note (const char *fmt, ...) { @@ -248,6 +256,10 @@ main(int argc, char **argv) ; } + if (optind >= argc) + /* Print one-line help and exit. */ + usage1 (ofile); + for (int i = optind; i < argc; i++) gmondump1 (argv[i]); |