[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090730123746.1fe58340.randy.dunlap@oracle.com>
Date: Thu, 30 Jul 2009 12:37:46 -0700
From: Randy Dunlap <randy.dunlap@...cle.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, tklauser@...tanz.ch
Subject: [PATCH v2] docbook: fix printk of ip address
From: Tobias Klauser <tklauser@...tanz.ch>
Use the %pI4 format string instead of %d.%d.%d.%d and NIPQUAD.
Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
---
Documentation/DocBook/kernel-hacking.tmpl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.31-rc4-git3.orig/Documentation/DocBook/kernel-hacking.tmpl
+++ linux-2.6.31-rc4-git3/Documentation/DocBook/kernel-hacking.tmpl
@@ -449,8 +449,8 @@ printk(KERN_INFO "i = %u\n", i);
</para>
<programlisting>
-__u32 ipaddress;
-printk(KERN_INFO "my ip: %d.%d.%d.%d\n", NIPQUAD(ipaddress));
+__be32 ipaddress;
+printk(KERN_INFO "my ip: %pI4\n", &ipaddress);
</programlisting>
<para>
---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
--
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