diff options
author | Alexander von Gernler <grunk@cvs.openbsd.org> | 2006-07-25 13:59:18 +0000 |
---|---|---|
committer | Alexander von Gernler <grunk@cvs.openbsd.org> | 2006-07-25 13:59:18 +0000 |
commit | b3b27cdbf6bd1b650db888b12698c4f0cb9f704f (patch) | |
tree | 4d7babf33a4c5111f6f4c91466b91ae26359f231 /sbin | |
parent | ff2e6bcb6efc1f5516c891b686ebd85d9650e851 (diff) |
ifconfig output contained trailing whites in inet and groups: lines
fix that by rearranging spaces in printf format strings
ok claudio@ mpf@ mickey@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 788535b1366..8f370e29af3 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.170 2006/06/27 21:47:10 reyk Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.171 2006/07/25 13:59:17 grunk Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -2415,7 +2415,7 @@ in_status(int force) */ memcpy(&sin2, &ifr.ifr_addr, sizeof(sin2)); - printf("\tinet %s ", inet_ntoa(sin->sin_addr)); + printf("\tinet %s", inet_ntoa(sin->sin_addr)); (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); if (ioctl(s, SIOCGIFNETMASK, (caddr_t)&ifr) < 0) { if (errno != EADDRNOTAVAIL) @@ -2434,9 +2434,9 @@ in_status(int force) } (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); sin = (struct sockaddr_in *)&ifr.ifr_dstaddr; - printf("--> %s ", inet_ntoa(sin->sin_addr)); + printf(" --> %s", inet_ntoa(sin->sin_addr)); } - printf("netmask 0x%x ", ntohl(netmask.sin_addr.s_addr)); + printf(" netmask 0x%x", ntohl(netmask.sin_addr.s_addr)); if (flags & IFF_BROADCAST) { memcpy(&ifr.ifr_addr, &sin2, sizeof(sin2)); if (ioctl(s, SIOCGIFBRDADDR, (caddr_t)&ifr) < 0) { @@ -2448,7 +2448,7 @@ in_status(int force) (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); sin = (struct sockaddr_in *)&ifr.ifr_addr; if (sin->sin_addr.s_addr != 0) - printf("broadcast %s", inet_ntoa(sin->sin_addr)); + printf(" broadcast %s", inet_ntoa(sin->sin_addr)); } putchar('\n'); } @@ -3930,9 +3930,9 @@ getifgroups(void) len -= sizeof(struct ifg_req); if (strcmp(ifg->ifgrq_group, "all")) { if (cnt == 0) - printf("\tgroups: "); + printf("\tgroups:"); cnt++; - printf("%s ", ifg->ifgrq_group); + printf(" %s", ifg->ifgrq_group); } } if (cnt) |