netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/ipv4/ipconfig: add device address to a KERN_INFO message
@ 2012-10-25  7:13 Claudio Fontana
  2012-10-25  7:24 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Claudio Fontana @ 2012-10-25  7:13 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-kernel

adds a "hwaddr" to the "IP-Config: Complete" KERN_INFO message
with the dev_addr of the device selected for auto configuration.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
---
  net/ipv4/ipconfig.c |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 798358b..d763701 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1500,8 +1500,10 @@ static int __init ip_auto_config(void)
  	 * Clue in the operator.
  	 */
  	pr_info("IP-Config: Complete:\n");
-	pr_info("     device=%s, addr=%pI4, mask=%pI4, gw=%pI4\n",
-		ic_dev->name, &ic_myaddr, &ic_netmask, &ic_gateway);
+
+	pr_info("     device=%s, hwaddr=%*phC, ipaddr=%pI4, mask=%pI4, gw=%pI4\n",
+		ic_dev->name, ic_dev->addr_len, ic_dev->dev_addr,
+		&ic_myaddr, &ic_netmask, &ic_gateway);
  	pr_info("     host=%s, domain=%s, nis-domain=%s\n",
  		utsname()->nodename, ic_domain, utsname()->domainname);
  	pr_info("     bootserver=%pI4, rootserver=%pI4, rootpath=%s",
-- 
1.7.4.4

Hello,

while troubleshooting an issue I was having trying to mount the root
filesystem using nfsroot running on a software emulation (solved),
I found it useful to be able to see the selected device address in the
"IP-Config: Complete" message during boot as I was troubleshooting,
and I thought it might be good in general, and a good way to try to
submit my first patch :)

The patch is against latest mainline.

Thank you for your help and comments,

Claudio Fontana

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/ipv4/ipconfig: add device address to a KERN_INFO message
  2012-10-25  7:13 [PATCH] net/ipv4/ipconfig: add device address to a KERN_INFO message Claudio Fontana
@ 2012-10-25  7:24 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-10-25  7:24 UTC (permalink / raw)
  To: Claudio.Fontana; +Cc: netdev, linux-kernel

From: Claudio Fontana <Claudio.Fontana@huawei.com>
Date: Thu, 25 Oct 2012 09:13:49 +0200

> -	pr_info("     device=%s, addr=%pI4, mask=%pI4, gw=%pI4\n",
> -		ic_dev->name, &ic_myaddr, &ic_netmask, &ic_gateway);
> +
> + pr_info(" device=%s, hwaddr=%*phC, ipaddr=%pI4, mask=%pI4,
> gw=%pI4\n",
> +		ic_dev->name, ic_dev->addr_len, ic_dev->dev_addr,
> +		&ic_myaddr, &ic_netmask, &ic_gateway);

Either you or your email client have destroyed the indentation
of these statements.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-25  7:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-25  7:13 [PATCH] net/ipv4/ipconfig: add device address to a KERN_INFO message Claudio Fontana
2012-10-25  7:24 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).