aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netconsole.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 21:46:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 21:46:43 -0400
commit15f7176eb1cccec0a332541285ee752b935c1c85 (patch)
tree9d33689be7415388ed57f437faaae883a4978a85 /drivers/net/netconsole.c
parentd3d52d687a770973b459d8a92ec1adbba3f60c4b (diff)
parent321dee6e8b235c496f0a068a72d8df9a4e13ceb9 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: wireless: remove duplicated .ndo_set_mac_address netfilter: xtables: fix IPv6 dependency in the cluster match tg3: Add GRO support. niu: Add GRO support. ucc_geth: Fix use-after-of_node_put() in ucc_geth_probe(). gianfar: Fix use-after-of_node_put() in gfar_of_init(). kernel: remove HIPQUAD() netpoll: store local and remote ip in net-endian netfilter: fix endian bug in conntrack printks dmascc: fix incomplete conversion to network_device_ops gso: Fix support for linear packets skbuff.h: fix missing kernel-doc ni5010: convert to net_device_ops
Diffstat (limited to 'drivers/net/netconsole.c')
-rw-r--r--drivers/net/netconsole.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index d304d38cd5d1..eceadf787a67 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -294,14 +294,12 @@ static ssize_t show_remote_port(struct netconsole_target *nt, char *buf)
294 294
295static ssize_t show_local_ip(struct netconsole_target *nt, char *buf) 295static ssize_t show_local_ip(struct netconsole_target *nt, char *buf)
296{ 296{
297 return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n", 297 return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.local_ip);
298 HIPQUAD(nt->np.local_ip));
299} 298}
300 299
301static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf) 300static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf)
302{ 301{
303 return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n", 302 return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.remote_ip);
304 HIPQUAD(nt->np.remote_ip));
305} 303}
306 304
307static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) 305static ssize_t show_local_mac(struct netconsole_target *nt, char *buf)
@@ -438,7 +436,7 @@ static ssize_t store_local_ip(struct netconsole_target *nt,
438 return -EINVAL; 436 return -EINVAL;
439 } 437 }
440 438
441 nt->np.local_ip = ntohl(in_aton(buf)); 439 nt->np.local_ip = in_aton(buf);
442 440
443 return strnlen(buf, count); 441 return strnlen(buf, count);
444} 442}
@@ -454,7 +452,7 @@ static ssize_t store_remote_ip(struct netconsole_target *nt,
454 return -EINVAL; 452 return -EINVAL;
455 } 453 }
456 454
457 nt->np.remote_ip = ntohl(in_aton(buf)); 455 nt->np.remote_ip = in_aton(buf);
458 456
459 return strnlen(buf, count); 457 return strnlen(buf, count);
460} 458}