diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-06 18:36:50 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-06 18:36:50 +0000 |
commit | 3538b9a8822421b7c8596a33a917dcf2f99c92b7 (patch) | |
tree | 768c23fe79bb81583de7376a4d744632d888d303 /networking/udhcp/clientsocket.c | |
parent | 5d725462d44268f9a86030daaa6f6396d32f796c (diff) | |
download | busybox-w32-3538b9a8822421b7c8596a33a917dcf2f99c92b7.tar.gz busybox-w32-3538b9a8822421b7c8596a33a917dcf2f99c92b7.tar.bz2 busybox-w32-3538b9a8822421b7c8596a33a917dcf2f99c92b7.zip |
Implement optional syslog logging using ordinary
bb_xx_msg calls, and convert networking/* to it.
The rest of bbox will be converted gradually.
Diffstat (limited to 'networking/udhcp/clientsocket.c')
-rw-r--r-- | networking/udhcp/clientsocket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/clientsocket.c b/networking/udhcp/clientsocket.c index a1c4eadab..982aca1bb 100644 --- a/networking/udhcp/clientsocket.c +++ b/networking/udhcp/clientsocket.c | |||
@@ -44,9 +44,9 @@ int raw_socket(int ifindex) | |||
44 | int fd; | 44 | int fd; |
45 | struct sockaddr_ll sock; | 45 | struct sockaddr_ll sock; |
46 | 46 | ||
47 | DEBUG(LOG_INFO, "Opening raw socket on ifindex %d", ifindex); | 47 | DEBUG("Opening raw socket on ifindex %d", ifindex); |
48 | if ((fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) { | 48 | if ((fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) { |
49 | DEBUG(LOG_ERR, "socket call failed: %m"); | 49 | bb_perror_msg("socket"); |
50 | return -1; | 50 | return -1; |
51 | } | 51 | } |
52 | 52 | ||
@@ -54,7 +54,7 @@ int raw_socket(int ifindex) | |||
54 | sock.sll_protocol = htons(ETH_P_IP); | 54 | sock.sll_protocol = htons(ETH_P_IP); |
55 | sock.sll_ifindex = ifindex; | 55 | sock.sll_ifindex = ifindex; |
56 | if (bind(fd, (struct sockaddr *) &sock, sizeof(sock)) < 0) { | 56 | if (bind(fd, (struct sockaddr *) &sock, sizeof(sock)) < 0) { |
57 | DEBUG(LOG_ERR, "bind call failed: %m"); | 57 | bb_perror_msg("bind:"); |
58 | close(fd); | 58 | close(fd); |
59 | return -1; | 59 | return -1; |
60 | } | 60 | } |