From b69c7c0b789e7ca4de555baab2ee087e1bb5d231 Mon Sep 17 00:00:00 2001 From: fenner Date: Wed, 17 Oct 2001 01:44:34 +0000 Subject: If the remote uptime is less than one minute, print the uptime in seconds instead of leaving the uptime field blank. --- usr.bin/rup/rup.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'usr.bin/rup/rup.c') diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c index a93c6a2..b660b81 100644 --- a/usr.bin/rup/rup.c +++ b/usr.bin/rup/rup.c @@ -133,6 +133,8 @@ rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp) else if (host_uptime.tm_min != 0) sprintf(hours_buf, "%2d mins, ", host_uptime.tm_min); + else if (host_stat->curtime.tv_sec < 60) + sprintf(hours_buf, "%2d secs, ", host_uptime.tm_sec); else hours_buf[0] = '\0'; -- cgit v1.1