diff options
author | Igor Sobrado <sobrado@cvs.openbsd.org> | 2009-10-30 19:41:11 +0000 |
---|---|---|
committer | Igor Sobrado <sobrado@cvs.openbsd.org> | 2009-10-30 19:41:11 +0000 |
commit | 099dbfa714e8ef3a7cbd0c7848b008c646f126ea (patch) | |
tree | 3cf8b474426292a21bad3adb56105028c4ba1af0 /usr.sbin/apm/apm.c | |
parent | d69ba5aac639b64ce4b5622748a79da0fa093770 (diff) |
when used with incorrect flags, zzz(8) should call zzusage(void)
instead of usage(void).
millert@ suggested checking __progname() against "zzz" to match
existing code.
ok millert@
Diffstat (limited to 'usr.sbin/apm/apm.c')
-rw-r--r-- | usr.sbin/apm/apm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/apm/apm.c b/usr.sbin/apm/apm.c index bc2de721eeb..f77dfa2ccfc 100644 --- a/usr.sbin/apm/apm.c +++ b/usr.sbin/apm/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.23 2006/06/11 17:45:54 sturm Exp $ */ +/* $OpenBSD: apm.c,v 1.24 2009/10/30 19:41:10 sobrado Exp $ */ /* * Copyright (c) 1996 John T. Kohl @@ -220,7 +220,10 @@ main(int argc, char *argv[]) action = GETSTATUS; break; default: - usage(); + if (!strcmp(__progname, "zzz")) + zzusage(); + else + usage(); } } |