aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/ruptime
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>1996-10-23 04:23:36 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>1996-10-23 04:23:36 +0000
commit5d53f683d343284d8af3d523e9422c37bb829d67 (patch)
tree59bc6f4e4d6aee7712626e597a8adb2c91d15f61 /usr.bin/ruptime
parent4bd2ba9f375ef037ed64d637274395de8277996f (diff)
downloadsrc-5d53f683d343284d8af3d523e9422c37bb829d67.tar.gz
src-5d53f683d343284d8af3d523e9422c37bb829d67.zip
Notes
Diffstat (limited to 'usr.bin/ruptime')
-rw-r--r--usr.bin/ruptime/ruptime.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ruptime/ruptime.c b/usr.bin/ruptime/ruptime.c
index ba02fdbd05d3..1fa0641098d8 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"));