diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-01-03 10:07:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-01-03 10:07:20 +0000 |
commit | d22711f6ff76890d56da0120fe0bd9c38ebb60f0 (patch) | |
tree | 145198c0584994f3a69f76c0fb118773e9a08e6b /sys/nfs/nfs_boot.c | |
parent | 8ad0de8dc9c489477e0a5e410bf60d64ace1f5d7 (diff) |
print addresses using inet_ntoa ( )
Diffstat (limited to 'sys/nfs/nfs_boot.c')
-rw-r--r-- | sys/nfs/nfs_boot.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/nfs/nfs_boot.c b/sys/nfs/nfs_boot.c index 6e459355aea..8ff20f81ee2 100644 --- a/sys/nfs/nfs_boot.c +++ b/sys/nfs/nfs_boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_boot.c,v 1.10 1997/01/22 18:20:49 deraadt Exp $ */ +/* $OpenBSD: nfs_boot.c,v 1.11 1999/01/03 10:07:19 deraadt Exp $ */ /* $NetBSD: nfs_boot.c,v 1.26 1996/05/07 02:51:25 thorpej Exp $ */ /* @@ -171,7 +171,7 @@ nfs_boot_init(nd, procp) */ if ((error = revarpwhoami(&my_ip, ifp)) != 0) panic("revarp failed, error=%d", error); - printf("nfs_boot: client_addr=0x%x\n", (u_int32_t)ntohl(my_ip.s_addr)); + printf("nfs_boot: client_addr=%s\n", inet_ntoa(my_ip)); /* * Do enough of ifconfig(8) so that the chosen interface @@ -206,9 +206,8 @@ nfs_boot_init(nd, procp) error = bp_whoami(&bp_sin, &my_ip, &gw_ip); if (error) panic("nfs_boot: bootparam whoami, error=%d", error); - printf("nfs_boot: server_addr=0x%x\n", - (u_int32_t)ntohl(bp_sin.sin_addr.s_addr)); - printf("nfs_boot: hostname=%s\n", hostname); + printf("nfs_boot: server_addr=%s hostname=%s\n", + inet_ntoa(bp_sin.sin_addr), hostname); #ifdef NFS_BOOT_GATEWAY /* @@ -239,7 +238,7 @@ nfs_boot_init(nd, procp) /* Mask: (zero length) */ bzero(&mask, sizeof(mask)); - printf("nfs_boot: gateway=0x%x\n", ntohl(gw_ip.s_addr)); + printf("nfs_boot: gateway=%s\n", inet_ntoa(gw_ip)); /* add, dest, gw, mask, flags, 0 */ error = rtrequest(RTM_ADD, &dst, (struct sockaddr *)&gw, &mask, (RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL); |