diff options
author | fenner <fenner@FreeBSD.org> | 2001-10-17 01:44:34 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 2001-10-17 01:44:34 +0000 |
commit | b69c7c0b789e7ca4de555baab2ee087e1bb5d231 (patch) | |
tree | ba81e709d7ba538136fe4787efc9a82264c135ed /usr.bin | |
parent | 74303ee776672cc16514cd0828b98d3204b41a07 (diff) | |
download | FreeBSD-src-b69c7c0b789e7ca4de555baab2ee087e1bb5d231.zip FreeBSD-src-b69c7c0b789e7ca4de555baab2ee087e1bb5d231.tar.gz |
If the remote uptime is less than one minute, print the uptime in
seconds instead of leaving the uptime field blank.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rup/rup.c | 2 |
1 files changed, 2 insertions, 0 deletions
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'; |