Do a better job of determining if we were called as uptime(1).
PR: 8593
This commit is contained in:
parent
9f63f2aa1c
commit
a288ccca56
@ -42,7 +42,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)w.c 8.4 (Berkeley) 4/16/94";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: w.c,v 1.27 1998/05/21 08:46:48 jkoshy Exp $";
|
||||
"$Id: w.c,v 1.28 1998/06/09 04:35:20 imp Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -141,10 +141,7 @@ main(argc, argv)
|
||||
(void) setlocale(LC_ALL, "");
|
||||
|
||||
/* Are we w(1) or uptime(1)? */
|
||||
p = __progname;
|
||||
if (*p == '-')
|
||||
p++;
|
||||
if (*p == 'u') {
|
||||
if (strstr(__progname, "uptime")) {
|
||||
wcmd = 0;
|
||||
p = "";
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user