Date: Fri, 15 Jan 2010 15:16:50 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r202367 - stable/7/sys/boot/common Message-ID: <201001151516.o0FFGod0009338@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Fri Jan 15 15:16:49 2010 New Revision: 202367 URL: http://svn.freebsd.org/changeset/base/202367 Log: MFC: r177108 (partial) Suppress excessive output while netbooting via loader, unless debugging. Modified: stable/7/sys/boot/common/dev_net.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/common/dev_net.c ============================================================================== --- stable/7/sys/boot/common/dev_net.c Fri Jan 15 15:10:29 2010 (r202366) +++ stable/7/sys/boot/common/dev_net.c Fri Jan 15 15:16:49 2010 (r202367) @@ -245,7 +245,8 @@ net_getparams(sock) printf("net_open: bootparam/whoami RPC failed\n"); return (EIO); } - printf("net_open: client name: %s\n", hostname); + if (debug) + printf("net_open: client name: %s\n", hostname); /* * Ignore the gateway from whoami (unreliable). @@ -259,10 +260,11 @@ net_getparams(sock) } if (smask) { netmask = smask; - printf("net_open: subnet mask: %s\n", intoa(netmask)); + if (debug) + printf("net_open: subnet mask: %s\n", intoa(netmask)); } - if (gateip.s_addr) - printf("net_open: net gateway: %s\n", inet_ntoa(gateip)); + if (gateip.s_addr && debug) + printf("net_open: net gateway: %s\n", inet_ntoa(gateip)); /* Get the root server and pathname. */ if (bp_getfile(sock, "root", &rootip, rootpath)) { @@ -270,7 +272,7 @@ net_getparams(sock) return (EIO); } exit: - /* + /* * If present, strip the server's address off of the rootpath * before passing it along. This allows us to be compatible with * the kernel's diskless (BOOTP_NFSROOT) booting conventions @@ -285,8 +287,10 @@ net_getparams(sock) bcopy(&rootpath[i], &temp[0], strlen(&rootpath[i])+1); bcopy(&temp[0], &rootpath[0], strlen(&rootpath[i])+1); } - printf("net_open: server addr: %s\n", inet_ntoa(rootip)); - printf("net_open: server path: %s\n", rootpath); + if (debug) { + printf("net_open: server addr: %s\n", inet_ntoa(rootip)); + printf("net_open: server path: %s\n", rootpath); + } d = socktodesc(sock); sprintf(temp, "%6D", d->myea, ":");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001151516.o0FFGod0009338>