diff options
| author | Giorgos Keramidas <keramida@FreeBSD.org> | 2003-03-22 09:39:52 +0000 |
|---|---|---|
| committer | Giorgos Keramidas <keramida@FreeBSD.org> | 2003-03-22 09:39:52 +0000 |
| commit | ab42be1fbf5039420b456130afbbbeecb7845642 (patch) | |
| tree | 86282ac426c4058589a554fc0d74e3bffa8611c3 /usr.sbin/gstat | |
| parent | 4fe8c1b67be0f8f7ecdefea1aee93a5f0eb64f88 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/gstat')
| -rw-r--r-- | usr.sbin/gstat/gstat.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/gstat/gstat.c b/usr.sbin/gstat/gstat.c index 82429353576a..dea545397c8c 100644 --- a/usr.sbin/gstat/gstat.c +++ b/usr.sbin/gstat/gstat.c @@ -50,6 +50,8 @@ static int flag_c; static int flag_I = 500000; +static void usage(void); + int main(int argc, char **argv) { @@ -88,13 +90,13 @@ main(int argc, char **argv) break; case '?': default: - errx(1, "Usage!"); + usage(); } } argc -= optind; argv += optind; if (argc != 0) - errx(1, "Usage!"); + usage(); i = geom_gettree(&gmp); if (i != 0) @@ -233,3 +235,11 @@ main(int argc, char **argv) endwin(); exit (0); } + +static void +usage(void) +{ + fprintf(stderr, "usage: gstat [-c] [-I interval]\n"); + exit(1); + /* NOTREACHED */ +} |
