=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rwho/Attic/rwho.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/rwho/Attic/rwho.c 1997/06/20 10:00:01 1.9 --- src/usr.bin/rwho/Attic/rwho.c 1998/04/26 17:01:02 1.10 *************** *** 1,4 **** ! /* $OpenBSD: rwho.c,v 1.9 1997/06/20 10:00:01 deraadt Exp $ */ /* * Copyright (c) 1983 The Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: rwho.c,v 1.10 1998/04/26 17:01:02 deraadt Exp $ */ /* * Copyright (c) 1983 The Regents of the University of California. *************** *** 41,47 **** #ifndef lint /*static char sccsid[] = "from: @(#)rwho.c 5.5 (Berkeley) 6/1/90";*/ ! static char rcsid[] = "$OpenBSD: rwho.c,v 1.9 1997/06/20 10:00:01 deraadt Exp $"; #endif /* not lint */ #include --- 41,47 ---- #ifndef lint /*static char sccsid[] = "from: @(#)rwho.c 5.5 (Berkeley) 6/1/90";*/ ! static char rcsid[] = "$OpenBSD: rwho.c,v 1.10 1998/04/26 17:01:02 deraadt Exp $"; #endif /* not lint */ #include *************** *** 78,83 **** --- 78,90 ---- time_t now; int aflg; + void + usage() + { + fprintf(stderr, "usage: rwho [-a]\n"); + exit(1); + } + int main(argc, argv) int argc; *************** *** 102,110 **** break; case '?': default: ! fprintf(stderr, "usage: rwho [-a]\n"); ! exit(1); } if (chdir(_PATH_RWHODIR) || (dirp = opendir(".")) == NULL) { perror(_PATH_RWHODIR); exit(1); --- 109,121 ---- break; case '?': default: ! usage(); } + argc -= optind; + argv += optind; + if (argc != 0) + usage(); + if (chdir(_PATH_RWHODIR) || (dirp = opendir(".")) == NULL) { perror(_PATH_RWHODIR); exit(1);