diff options
author | steve <steve@FreeBSD.org> | 1998-11-09 01:19:30 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1998-11-09 01:19:30 +0000 |
commit | 85139e6fc1b7d66f1dbb0376939fe268efc196b9 (patch) | |
tree | faebdd1e0bd6c555bc2fa644a6814ff24cb2d492 /usr.bin/w | |
parent | 34ddce576779e227daa38e0c6731cd4d42ae50cd (diff) | |
download | FreeBSD-src-85139e6fc1b7d66f1dbb0376939fe268efc196b9.zip FreeBSD-src-85139e6fc1b7d66f1dbb0376939fe268efc196b9.tar.gz |
Do a better job of determining if we were called as uptime(1).
PR: 8593
Diffstat (limited to 'usr.bin/w')
-rw-r--r-- | usr.bin/w/w.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index a102752..44d8009 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -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 { |