Major coreutils update.
diff --git a/networking/arping.c b/networking/arping.c
index bf0a77c..2e1adf0 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -302,9 +302,9 @@
break;
case 'I':
if (optarg == NULL)
- show_usage();
- if (xstrlen(optarg) > IF_NAMESIZE) {
- error_msg("Interface name `%s' must be less than %d", optarg,
+ bb_show_usage();
+ if (bb_strlen(optarg) > IF_NAMESIZE) {
+ bb_error_msg("Interface name `%s' must be less than %d", optarg,
IF_NAMESIZE);
exit(2);
}
@@ -319,20 +319,20 @@
case 'h':
case '?':
default:
- show_usage();
+ bb_show_usage();
}
}
argc -= optind;
argv += optind;
if (argc != 1)
- show_usage();
+ bb_show_usage();
target = *argv;
if (s < 0) {
- error_msg("socket");
+ bb_error_msg("socket");
exit(socket_errno);
}
@@ -342,21 +342,21 @@
memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, device, IFNAMSIZ - 1);
if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
- error_msg("Interface %s not found", device);
+ bb_error_msg("Interface %s not found", device);
exit(2);
}
ifindex = ifr.ifr_ifindex;
if (ioctl(s, SIOCGIFFLAGS, (char *) &ifr)) {
- error_msg("SIOCGIFFLAGS");
+ bb_error_msg("SIOCGIFFLAGS");
exit(2);
}
if (!(ifr.ifr_flags & IFF_UP)) {
- error_msg("Interface %s is down", device);
+ bb_error_msg("Interface %s is down", device);
exit(2);
}
if (ifr.ifr_flags & (IFF_NOARP | IFF_LOOPBACK)) {
- error_msg("Interface %s is not ARPable", device);
+ bb_error_msg("Interface %s is not ARPable", device);
exit(dad ? 0 : 2);
}
}
@@ -366,14 +366,14 @@
hp = gethostbyname2(target, AF_INET);
if (!hp) {
- error_msg("invalid or unknown target %s", target);
+ bb_error_msg("invalid or unknown target %s", target);
exit(2);
}
memcpy(&dst, hp->h_addr, 4);
}
if (source && !inet_aton(source, &src)) {
- error_msg("invalid source address %s", source);
+ bb_error_msg("invalid source address %s", source);
exit(2);
}
@@ -385,21 +385,21 @@
int probe_fd = socket(AF_INET, SOCK_DGRAM, 0);
if (probe_fd < 0) {
- error_msg("socket");
+ bb_error_msg("socket");
exit(2);
}
if (device) {
if (setsockopt
(probe_fd, SOL_SOCKET, SO_BINDTODEVICE, device,
strlen(device) + 1) == -1)
- error_msg("WARNING: interface %s is ignored", device);
+ bb_error_msg("WARNING: interface %s is ignored", device);
}
memset(&saddr, 0, sizeof(saddr));
saddr.sin_family = AF_INET;
if (src.s_addr) {
saddr.sin_addr = src;
if (bind(probe_fd, (struct sockaddr *) &saddr, sizeof(saddr)) == -1) {
- error_msg("bind");
+ bb_error_msg("bind");
exit(2);
}
} else if (!dad) {
@@ -415,12 +415,12 @@
perror("WARNING: setsockopt(SO_DONTROUTE)");
if (connect(probe_fd, (struct sockaddr *) &saddr, sizeof(saddr))
== -1) {
- error_msg("connect");
+ bb_error_msg("connect");
exit(2);
}
if (getsockname(probe_fd, (struct sockaddr *) &saddr, &alen) ==
-1) {
- error_msg("getsockname");
+ bb_error_msg("getsockname");
exit(2);
}
src = saddr.sin_addr;
@@ -432,7 +432,7 @@
me.sll_ifindex = ifindex;
me.sll_protocol = htons(ETH_P_ARP);
if (bind(s, (struct sockaddr *) &me, sizeof(me)) == -1) {
- error_msg("bind");
+ bb_error_msg("bind");
exit(2);
}
@@ -440,12 +440,12 @@
int alen = sizeof(me);
if (getsockname(s, (struct sockaddr *) &me, &alen) == -1) {
- error_msg("getsockname");
+ bb_error_msg("getsockname");
exit(2);
}
}
if (me.sll_halen == 0) {
- error_msg("Interface \"%s\" is not ARPable (no ll address)", device);
+ bb_error_msg("Interface \"%s\" is not ARPable (no ll address)", device);
exit(dad ? 0 : 2);
}
he = me;
@@ -458,7 +458,7 @@
}
if (!src.s_addr && !dad) {
- error_msg("no src address in the non-DAD mode");
+ bb_error_msg("no src address in the non-DAD mode");
exit(2);
}