summaryrefslogtreecommitdiff
path: root/networking/udhcp/socket.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-06-17 11:54:52 +0200
committerDenys Vlasenko2009-06-17 11:54:52 +0200
commitac906fa85e61b4e34161709de777616f858bc945 (patch)
tree7b247714814fd9dcf3fd3dccf954521b29eef5a2 /networking/udhcp/socket.c
parented8982bfc0e9895fe707a5f6152cf184e06f2052 (diff)
downloadbusybox-ac906fa85e61b4e34161709de777616f858bc945.zip
busybox-ac906fa85e61b4e34161709de777616f858bc945.tar.gz
udhcp: change UDHCP_DEBUG into int, make verbosity selectable with -v
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/socket.c')
-rw-r--r--networking/udhcp/socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c
index de494ca..6b15766 100644
--- a/networking/udhcp/socket.c
+++ b/networking/udhcp/socket.c
@@ -57,7 +57,7 @@ int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t
}
our_ip = (struct sockaddr_in *) &ifr.ifr_addr;
*nip = our_ip->sin_addr.s_addr;
- DEBUG("ip of %s = %s", interface, inet_ntoa(our_ip->sin_addr));
+ log1("IP %s", inet_ntoa(our_ip->sin_addr));
}
if (ifindex) {
@@ -65,7 +65,7 @@ int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t
close(fd);
return -1;
}
- DEBUG("adapter index %d", ifr.ifr_ifindex);
+ log1("Adapter index %d", ifr.ifr_ifindex);
*ifindex = ifr.ifr_ifindex;
}
@@ -75,7 +75,7 @@ int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t
return -1;
}
memcpy(mac, ifr.ifr_hwaddr.sa_data, 6);
- DEBUG("adapter hardware address %02x:%02x:%02x:%02x:%02x:%02x",
+ log1("MAC %02x:%02x:%02x:%02x:%02x:%02x",
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
}
@@ -90,7 +90,7 @@ int FAST_FUNC udhcp_listen_socket(/*uint32_t ip,*/ int port, const char *inf)
int fd;
struct sockaddr_in addr;
- DEBUG("Opening listen socket on *:%d %s", port, inf);
+ log1("Opening listen socket on *:%d %s", port, inf);
fd = xsocket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
setsockopt_reuseaddr(fd);