diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2017-12-14 18:03:04 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2017-12-14 18:03:04 +0000 |
commit | 8d297a6cf04c47faef13e9655c99db2545880d1b (patch) | |
tree | 7cbf6070761e87bbd982f8cd0f285da6c36d5720 /usr.bin | |
parent | 0e8b812ff2a87c85c7b4cbc034dd1d8e9ece1394 (diff) |
when -h is passed don't print any header, as is common practise in other systems too.
adjust uptime.1 while here as pointed out by martijn@
ok tb@ jca@ martijn@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/w/uptime.1 | 8 | ||||
-rw-r--r-- | usr.bin/w/w.c | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/w/uptime.1 b/usr.bin/w/uptime.1 index 83dfad58baa..03bf930dc57 100644 --- a/usr.bin/w/uptime.1 +++ b/usr.bin/w/uptime.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: uptime.1,v 1.14 2007/05/31 19:20:19 jmc Exp $ +.\" $OpenBSD: uptime.1,v 1.15 2017/12/14 18:03:03 jasper Exp $ .\" .\" Copyright (c) 1980, 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)uptime.1 8.2 (Berkeley) 4/18/94 .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: December 14 2017 $ .Dt UPTIME 1 .Os .Sh NAME @@ -44,9 +44,7 @@ utility displays the current time, the length of time the system has been up, the number of users, and the load average of the system over the last 1, 5, and 15 minutes. -This is the -.Dq heading -information from +This is the first line from .Xr w 1 . .Sh SEE ALSO .Xr w 1 diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 61cd8ea285a..e85784a49b6 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -1,4 +1,4 @@ -/* $OpenBSD: w.c,v 1.63 2017/07/27 14:17:34 jca Exp $ */ +/* $OpenBSD: w.c,v 1.64 2017/12/14 18:03:03 jasper Exp $ */ /*- * Copyright (c) 1980, 1991, 1993, 1994 @@ -224,7 +224,8 @@ main(int argc, char *argv[]) #define HEADER "USER TTY FROM LOGIN@ IDLE WHAT" #define WUSED (sizeof(HEADER) - sizeof("WHAT")) - (void)puts(HEADER); + if (header) + (void)puts(HEADER); kp = kvm_getprocs(kd, KERN_PROC_ALL, 0, sizeof(*kp), &nentries); if (kp == NULL) |