From owner-svn-src-stable@freebsd.org Thu Mar 21 00:17:44 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C11F1153FFF6; Thu, 21 Mar 2019 00:17:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63B57882AA; Thu, 21 Mar 2019 00:17:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CF8E525; Thu, 21 Mar 2019 00:17:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2L0HigK038103; Thu, 21 Mar 2019 00:17:44 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2L0Hh0G038100; Thu, 21 Mar 2019 00:17:43 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201903210017.x2L0Hh0G038100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 21 Mar 2019 00:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345357 - stable/12/sbin/ifconfig X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/sbin/ifconfig X-SVN-Commit-Revision: 345357 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 63B57882AA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Mar 2019 00:17:45 -0000 Author: asomers Date: Thu Mar 21 00:17:43 2019 New Revision: 345357 URL: https://svnweb.freebsd.org/changeset/base/345357 Log: MFC r344559: ifconfig: eliminate trailing whitespace Eliminate trailing whitespace on inet, inet6, and groups lines. I think the "list txpower" command will still show some, but I'm not able to test that. PR: 153731 Reported-by: Nikolay Denev Differential Revision: https://reviews.freebsd.org/D19004 Modified: stable/12/sbin/ifconfig/af_inet.c stable/12/sbin/ifconfig/af_inet6.c stable/12/sbin/ifconfig/ifconfig.c stable/12/sbin/ifconfig/ifgroup.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ifconfig/af_inet.c ============================================================================== --- stable/12/sbin/ifconfig/af_inet.c Thu Mar 21 00:11:43 2019 (r345356) +++ stable/12/sbin/ifconfig/af_inet.c Thu Mar 21 00:17:43 2019 (r345357) @@ -107,16 +107,16 @@ in_status(int s __unused, const struct ifaddrs *ifa) if (cidr == 0) break; } - printf("/%d ", cidr); + printf("/%d", cidr); } else if (f_inet != NULL && strcmp(f_inet, "dotted") == 0) - printf(" netmask %s ", inet_ntoa(sin->sin_addr)); + printf(" netmask %s", inet_ntoa(sin->sin_addr)); else - printf(" netmask 0x%lx ", (unsigned long)ntohl(sin->sin_addr.s_addr)); + printf(" netmask 0x%lx", (unsigned long)ntohl(sin->sin_addr.s_addr)); if (ifa->ifa_flags & IFF_BROADCAST) { sin = (struct sockaddr_in *)ifa->ifa_broadaddr; if (sin != NULL && sin->sin_addr.s_addr != 0) - printf("broadcast %s ", inet_ntoa(sin->sin_addr)); + printf(" broadcast %s", inet_ntoa(sin->sin_addr)); } print_vhid(ifa, " "); Modified: stable/12/sbin/ifconfig/af_inet6.c ============================================================================== --- stable/12/sbin/ifconfig/af_inet6.c Thu Mar 21 00:11:43 2019 (r345356) +++ stable/12/sbin/ifconfig/af_inet6.c Thu Mar 21 00:17:43 2019 (r345357) @@ -247,49 +247,49 @@ in6_status(int s __unused, const struct ifaddrs *ifa) if (sin == NULL) sin = &null_sin; if (f_inet6 != NULL && strcmp(f_inet6, "cidr") == 0) - printf("/%d ", prefix(&sin->sin6_addr, + printf("/%d", prefix(&sin->sin6_addr, sizeof(struct in6_addr))); else - printf(" prefixlen %d ", prefix(&sin->sin6_addr, + printf(" prefixlen %d", prefix(&sin->sin6_addr, sizeof(struct in6_addr))); if ((flags6 & IN6_IFF_ANYCAST) != 0) - printf("anycast "); + printf(" anycast"); if ((flags6 & IN6_IFF_TENTATIVE) != 0) - printf("tentative "); + printf(" tentative"); if ((flags6 & IN6_IFF_DUPLICATED) != 0) - printf("duplicated "); + printf(" duplicated"); if ((flags6 & IN6_IFF_DETACHED) != 0) - printf("detached "); + printf(" detached"); if ((flags6 & IN6_IFF_DEPRECATED) != 0) - printf("deprecated "); + printf(" deprecated"); if ((flags6 & IN6_IFF_AUTOCONF) != 0) - printf("autoconf "); + printf(" autoconf"); if ((flags6 & IN6_IFF_TEMPORARY) != 0) - printf("temporary "); + printf(" temporary"); if ((flags6 & IN6_IFF_PREFER_SOURCE) != 0) - printf("prefer_source "); + printf(" prefer_source"); if (((struct sockaddr_in6 *)(ifa->ifa_addr))->sin6_scope_id) - printf("scopeid 0x%x ", + printf(" scopeid 0x%x", ((struct sockaddr_in6 *)(ifa->ifa_addr))->sin6_scope_id); if (ip6lifetime && (lifetime.ia6t_preferred || lifetime.ia6t_expire)) { - printf("pltime "); + printf(" pltime"); if (lifetime.ia6t_preferred) { - printf("%s ", lifetime.ia6t_preferred < now.tv_sec + printf(" %s", lifetime.ia6t_preferred < now.tv_sec ? "0" : sec2str(lifetime.ia6t_preferred - now.tv_sec)); } else - printf("infty "); + printf(" infty"); - printf("vltime "); + printf(" vltime"); if (lifetime.ia6t_expire) { - printf("%s ", lifetime.ia6t_expire < now.tv_sec + printf(" %s", lifetime.ia6t_expire < now.tv_sec ? "0" : sec2str(lifetime.ia6t_expire - now.tv_sec)); } else - printf("infty "); + printf(" infty"); } print_vhid(ifa, " "); Modified: stable/12/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/12/sbin/ifconfig/ifconfig.c Thu Mar 21 00:11:43 2019 (r345356) +++ stable/12/sbin/ifconfig/ifconfig.c Thu Mar 21 00:17:43 2019 (r345357) @@ -1405,7 +1405,7 @@ print_vhid(const struct ifaddrs *ifa, const char *s) if (ifd->ifi_vhid == 0) return; - printf("vhid %d ", ifd->ifi_vhid); + printf(" vhid %d", ifd->ifi_vhid); } void Modified: stable/12/sbin/ifconfig/ifgroup.c ============================================================================== --- stable/12/sbin/ifconfig/ifgroup.c Thu Mar 21 00:11:43 2019 (r345356) +++ stable/12/sbin/ifconfig/ifgroup.c Thu Mar 21 00:17:43 2019 (r345357) @@ -113,9 +113,9 @@ getifgroups(int s) 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)