提交 2a8aaacd 编写于 作者: T Tobias Klauser 提交者: David S. Miller

docbook: fix printk of ip address

Use the %pI4 format string instead of %d.%d.%d.%d and NIPQUAD.
Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a541f840
......@@ -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", &amp;ipaddress);
</programlisting>
<para>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册