[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1305409519-25404-1-git-send-email-micha@neli.hopto.org>
Date: Sat, 14 May 2011 23:45:19 +0200
From: Micha Nelissen <micha@...i.hopto.org>
To: netdev@...r.kernel.org, davem@...emloft.net
Subject: [PATCH] output ipconfig info message as one printk
the "ip-config complete" message with ip address etc is output using
many printks. When using the netconsole, and multiple agents are booting
(and logging their boot) simultaneously, the syslog of the receiving
host gets very messy, as the individual printks are interleaved.
Combining the many printks into one printk improves syslog readability.
Index: atom-linux/net/ipv4/ipconfig.c
===================================================================
--- atom-linux/net/ipv4/ipconfig.c (revision 1493)
+++ atom-linux/net/ipv4/ipconfig.c (revision 1494)
@@ -1363,6 +1363,9 @@
#ifdef IPCONFIG_DYNAMIC
int retries = CONF_OPEN_RETRIES;
#endif
+#ifndef IPCONFIG_SILENT
+ char mtubuf[16];
+#endif
int err;
#ifdef CONFIG_PROC_FS
@@ -1477,19 +1480,17 @@
/*
* Clue in the operator.
*/
- printk("IP-Config: Complete:");
- printk("\n device=%s", ic_dev->name);
- printk(", addr=%pI4", &ic_myaddr);
- printk(", mask=%pI4", &ic_netmask);
- printk(", gw=%pI4", &ic_gateway);
- printk(",\n host=%s, domain=%s, nis-domain=%s",
- utsname()->nodename, ic_domain, utsname()->domainname);
- printk(",\n bootserver=%pI4", &ic_servaddr);
- printk(", rootserver=%pI4", &root_server_addr);
- printk(", rootpath=%s", root_server_path);
if (ic_dev_mtu)
- printk(", mtu=%d", ic_dev_mtu);
- printk("\n");
+ snprintf(mtubuf, sizeof(mtubuf), "mtu=%d, ", ic_dev_mtu);
+ else
+ mtubuf[0] = '\0';
+ printk( "IP-Config: Complete:\n"
+ " device=%s, addr=%pI4, mask=%pI4, gw=%pI4,\n"
+ " %shost=%s, domain=%s, nis-domain=%s,\n"
+ " bootserver=%pI4, rootserver=%pI4, rootpath=%s\n",
+ ic_dev->name, &ic_myaddr, &ic_netmask, &ic_gateway,
+ mtubuf, utsname()->nodename, ic_domain, utsname()->domainname,
+ &ic_servaddr, &root_server_addr, root_server_path);
#endif /* !SILENT */
return 0;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists