diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-14 07:09:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-14 07:09:00 -0400 |
commit | a7d632b6b4ad1c92746ed409e41f9dc571ec04e2 (patch) | |
tree | 90e6aa51a9df50aa4a437749e89356ab15a0ff5f /net/ipv4/ipconfig.c | |
parent | 334f8b2afd9652e20f67ddee4fec483ed860425b (diff) |
[IPV4]: Use NIPQUAD_FMT to format ipv4 addresses.
And use %u to format port.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipconfig.c')
-rw-r--r-- | net/ipv4/ipconfig.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 08e8fb60d315..0b859d46ea74 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -376,7 +376,7 @@ static int __init ic_defaults(void) | |||
376 | */ | 376 | */ |
377 | 377 | ||
378 | if (!ic_host_name_set) | 378 | if (!ic_host_name_set) |
379 | sprintf(init_utsname()->nodename, "%u.%u.%u.%u", NIPQUAD(ic_myaddr)); | 379 | sprintf(init_utsname()->nodename, NIPQUAD_FMT, NIPQUAD(ic_myaddr)); |
380 | 380 | ||
381 | if (root_server_addr == NONE) | 381 | if (root_server_addr == NONE) |
382 | root_server_addr = ic_servaddr; | 382 | root_server_addr = ic_servaddr; |
@@ -389,11 +389,11 @@ static int __init ic_defaults(void) | |||
389 | else if (IN_CLASSC(ntohl(ic_myaddr))) | 389 | else if (IN_CLASSC(ntohl(ic_myaddr))) |
390 | ic_netmask = htonl(IN_CLASSC_NET); | 390 | ic_netmask = htonl(IN_CLASSC_NET); |
391 | else { | 391 | else { |
392 | printk(KERN_ERR "IP-Config: Unable to guess netmask for address %u.%u.%u.%u\n", | 392 | printk(KERN_ERR "IP-Config: Unable to guess netmask for address " NIPQUAD_FMT "\n", |
393 | NIPQUAD(ic_myaddr)); | 393 | NIPQUAD(ic_myaddr)); |
394 | return -1; | 394 | return -1; |
395 | } | 395 | } |
396 | printk("IP-Config: Guessing netmask %u.%u.%u.%u\n", NIPQUAD(ic_netmask)); | 396 | printk("IP-Config: Guessing netmask " NIPQUAD_FMT "\n", NIPQUAD(ic_netmask)); |
397 | } | 397 | } |
398 | 398 | ||
399 | return 0; | 399 | return 0; |
@@ -981,9 +981,9 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str | |||
981 | ic_myaddr = b->your_ip; | 981 | ic_myaddr = b->your_ip; |
982 | ic_servaddr = server_id; | 982 | ic_servaddr = server_id; |
983 | #ifdef IPCONFIG_DEBUG | 983 | #ifdef IPCONFIG_DEBUG |
984 | printk("DHCP: Offered address %u.%u.%u.%u", | 984 | printk("DHCP: Offered address " NIPQUAD_FMT, |
985 | NIPQUAD(ic_myaddr)); | 985 | NIPQUAD(ic_myaddr)); |
986 | printk(" by server %u.%u.%u.%u\n", | 986 | printk(" by server " NIPQUAD_FMT "\n", |
987 | NIPQUAD(ic_servaddr)); | 987 | NIPQUAD(ic_servaddr)); |
988 | #endif | 988 | #endif |
989 | /* The DHCP indicated server address takes | 989 | /* The DHCP indicated server address takes |
@@ -1179,11 +1179,11 @@ static int __init ic_dynamic(void) | |||
1179 | return -1; | 1179 | return -1; |
1180 | } | 1180 | } |
1181 | 1181 | ||
1182 | printk("IP-Config: Got %s answer from %u.%u.%u.%u, ", | 1182 | printk("IP-Config: Got %s answer from " NIPQUAD_FMT ", ", |
1183 | ((ic_got_reply & IC_RARP) ? "RARP" | 1183 | ((ic_got_reply & IC_RARP) ? "RARP" |
1184 | : (ic_proto_enabled & IC_USE_DHCP) ? "DHCP" : "BOOTP"), | 1184 | : (ic_proto_enabled & IC_USE_DHCP) ? "DHCP" : "BOOTP"), |
1185 | NIPQUAD(ic_servaddr)); | 1185 | NIPQUAD(ic_servaddr)); |
1186 | printk("my address is %u.%u.%u.%u\n", NIPQUAD(ic_myaddr)); | 1186 | printk("my address is " NIPQUAD_FMT "\n", NIPQUAD(ic_myaddr)); |
1187 | 1187 | ||
1188 | return 0; | 1188 | return 0; |
1189 | } | 1189 | } |
@@ -1209,12 +1209,12 @@ static int pnp_seq_show(struct seq_file *seq, void *v) | |||
1209 | for (i = 0; i < CONF_NAMESERVERS_MAX; i++) { | 1209 | for (i = 0; i < CONF_NAMESERVERS_MAX; i++) { |
1210 | if (ic_nameservers[i] != NONE) | 1210 | if (ic_nameservers[i] != NONE) |
1211 | seq_printf(seq, | 1211 | seq_printf(seq, |
1212 | "nameserver %u.%u.%u.%u\n", | 1212 | "nameserver " NIPQUAD_FMT "\n", |
1213 | NIPQUAD(ic_nameservers[i])); | 1213 | NIPQUAD(ic_nameservers[i])); |
1214 | } | 1214 | } |
1215 | if (ic_servaddr != NONE) | 1215 | if (ic_servaddr != NONE) |
1216 | seq_printf(seq, | 1216 | seq_printf(seq, |
1217 | "bootserver %u.%u.%u.%u\n", | 1217 | "bootserver " NIPQUAD_FMT "\n", |
1218 | NIPQUAD(ic_servaddr)); | 1218 | NIPQUAD(ic_servaddr)); |
1219 | return 0; | 1219 | return 0; |
1220 | } | 1220 | } |
@@ -1389,13 +1389,13 @@ static int __init ip_auto_config(void) | |||
1389 | */ | 1389 | */ |
1390 | printk("IP-Config: Complete:"); | 1390 | printk("IP-Config: Complete:"); |
1391 | printk("\n device=%s", ic_dev->name); | 1391 | printk("\n device=%s", ic_dev->name); |
1392 | printk(", addr=%u.%u.%u.%u", NIPQUAD(ic_myaddr)); | 1392 | printk(", addr=" NIPQUAD_FMT, NIPQUAD(ic_myaddr)); |
1393 | printk(", mask=%u.%u.%u.%u", NIPQUAD(ic_netmask)); | 1393 | printk(", mask=" NIPQUAD_FMT, NIPQUAD(ic_netmask)); |
1394 | printk(", gw=%u.%u.%u.%u", NIPQUAD(ic_gateway)); | 1394 | printk(", gw=" NIPQUAD_FMT, NIPQUAD(ic_gateway)); |
1395 | printk(",\n host=%s, domain=%s, nis-domain=%s", | 1395 | printk(",\n host=%s, domain=%s, nis-domain=%s", |
1396 | utsname()->nodename, ic_domain, utsname()->domainname); | 1396 | utsname()->nodename, ic_domain, utsname()->domainname); |
1397 | printk(",\n bootserver=%u.%u.%u.%u", NIPQUAD(ic_servaddr)); | 1397 | printk(",\n bootserver=" NIPQUAD_FMT, NIPQUAD(ic_servaddr)); |
1398 | printk(", rootserver=%u.%u.%u.%u", NIPQUAD(root_server_addr)); | 1398 | printk(", rootserver=" NIPQUAD_FMT, NIPQUAD(root_server_addr)); |
1399 | printk(", rootpath=%s", root_server_path); | 1399 | printk(", rootpath=%s", root_server_path); |
1400 | printk("\n"); | 1400 | printk("\n"); |
1401 | #endif /* !SILENT */ | 1401 | #endif /* !SILENT */ |