summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/w/pr_time.c6
-rw-r--r--usr.bin/w/proc_compare.c6
-rw-r--r--usr.bin/w/w.c16
3 files changed, 23 insertions, 5 deletions
diff --git a/usr.bin/w/pr_time.c b/usr.bin/w/pr_time.c
index 7bf6b7ed988..10caa4ed721 100644
--- a/usr.bin/w/pr_time.c
+++ b/usr.bin/w/pr_time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pr_time.c,v 1.8 1997/03/25 21:25:59 deraadt Exp $ */
+/* $OpenBSD: pr_time.c,v 1.9 1998/01/16 17:50:42 millert Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -34,7 +34,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)pr_time.c 8.2 (Berkeley) 4/4/94";
+#else
+static char *rcsid = "$OpenBSD: pr_time.c,v 1.9 1998/01/16 17:50:42 millert Exp $";
+#endif
#endif /* not lint */
#include <sys/types.h>
diff --git a/usr.bin/w/proc_compare.c b/usr.bin/w/proc_compare.c
index df85e571a59..d28a3644371 100644
--- a/usr.bin/w/proc_compare.c
+++ b/usr.bin/w/proc_compare.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc_compare.c,v 1.2 1996/06/26 05:42:43 deraadt Exp $ */
+/* $OpenBSD: proc_compare.c,v 1.3 1998/01/16 17:50:43 millert Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,7 +34,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)proc_compare.c 8.2 (Berkeley) 9/23/93";
+#else
+static char *rcsid = "$OpenBSD: proc_compare.c,v 1.3 1998/01/16 17:50:43 millert Exp $";
+#endif
#endif /* not lint */
#include <sys/param.h>
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index eb97475cc59..0b88efe5ac7 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: w.c,v 1.22 1997/12/24 19:57:11 deraadt Exp $ */
+/* $OpenBSD: w.c,v 1.23 1998/01/16 17:50:43 millert Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -40,7 +40,11 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
+#if 0
static char sccsid[] = "@(#)w.c 8.4 (Berkeley) 4/16/94";
+#else
+static char *rcsid = "$OpenBSD: w.c,v 1.23 1998/01/16 17:50:43 millert Exp $";
+#endif
#endif /* not lint */
/*
@@ -345,13 +349,19 @@ pr_args(kp)
char **argv, *str;
int left;
- if (kp == 0)
+ if (kp == NULL)
goto nothing;
left = argwidth;
argv = kvm_getargv(kd, kp, argwidth+60); /*+60 for ftpd snip */
- if (argv == 0)
+ if (argv == NULL)
goto nothing;
+ if (*argv == NULL || **argv == '\0') {
+ /* Process has zeroed argv[0], display executable name. */
+ fmt_putc('(', &left);
+ fmt_puts(kp->kp_proc.p_comm, &left);
+ fmt_putc(')', &left);
+ }
while (*argv) {
/* ftp is a special case... */
if (strncmp(*argv, "ftpd:", 5) == 0) {