diff options
Diffstat (limited to 'usr.bin/rup/rup.c')
-rw-r--r-- | usr.bin/rup/rup.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c index 8ac9c1af12ff..0ae1be14ddde 100644 --- a/usr.bin/rup/rup.c +++ b/usr.bin/rup/rup.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: rup.c,v 1.2 1993/09/23 18:45:57 jtc Exp $"; +static char rcsid[] = "$Id: rup.c,v 1.3 1994/04/10 10:42:28 csgr Exp $"; #endif /* not lint */ #include <stdio.h> @@ -106,6 +106,10 @@ rstat_reply(char *replyp, struct sockaddr_in *raddrp) else host = inet_ntoa(raddrp->sin_addr); + /* truncate hostname to fit nicely into field */ + if (strlen(host) > HOST_WIDTH) + host[HOST_WIDTH] = '\0'; + printf("%-*s\t", HOST_WIDTH, host); tmp_time = localtime((time_t *)&host_stat->curtime.tv_sec); |