diff options
author | scrappy <scrappy@FreeBSD.org> | 1996-10-23 04:23:36 +0000 |
---|---|---|
committer | scrappy <scrappy@FreeBSD.org> | 1996-10-23 04:23:36 +0000 |
commit | f98273b79e546266e73b48025be78694a3f084b2 (patch) | |
tree | 59bc6f4e4d6aee7712626e597a8adb2c91d15f61 /usr.bin | |
parent | 142fcea2c3acb6ec1236ea98c5e1961c68d8d0ac (diff) | |
download | FreeBSD-src-f98273b79e546266e73b48025be78694a3f084b2.zip FreeBSD-src-f98273b79e546266e73b48025be78694a3f084b2.tar.gz |
Description:
Machine come and go...
Little patch removes lists down for over 4 days from the list.
(If you haven't noticed they are down in that period, you should
turn them off!)
Closes: PR#bin/1361
Submitted by: xaa@stack.urc.tue.nl
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ruptime/ruptime.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ruptime/ruptime.c b/usr.bin/ruptime/ruptime.c index ba02fdb..1fa0641 100644 --- a/usr.bin/ruptime/ruptime.c +++ b/usr.bin/ruptime/ruptime.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ -/* $Id: ruptime.c,v 1.5 1995/08/07 19:17:40 wollman Exp $ */ +/* $Id: ruptime.c,v 1.6 1995/09/08 20:33:21 jkh Exp $ */ #ifndef lint static char copyright[] = @@ -62,7 +62,7 @@ struct hs { int hs_nusers; } *hs; struct whod awhod; - +#define LEFTEARTH(h) (now - (h)->hs_wd->wd_recvtime > 4*24*60*60) #define ISDOWN(h) (now - (h)->hs_wd->wd_recvtime > 11 * 60) #define WHDRSIZE (sizeof (awhod) - sizeof (awhod.wd_we)) @@ -167,6 +167,8 @@ main(argc, argv) qsort(hs, nhosts, sizeof(hs[0]), cmp); for (i = 0; i < nhosts; i++) { hsp = &hs[i]; + if (LEFTEARTH(hsp)) + continue; if (ISDOWN(hsp)) { (void)printf("%-12.12s%s\n", hsp->hs_wd->wd_hostname, interval(now - hsp->hs_wd->wd_recvtime, "down")); |