stop using __u32 etc. uint32_t is there for a reason
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c
index ea57d60..ae41ab3 100644
--- a/networking/libiproute/iplink.c
+++ b/networking/libiproute/iplink.c
@@ -47,11 +47,11 @@
if (fd >= 0)
return fd;
errno = s_errno;
- perror("Cannot create control socket");
+ bb_perror_msg("cannot create control socket");
return -1;
}
-static int do_chflags(char *dev, __u32 flags, __u32 mask)
+static int do_chflags(char *dev, uint32_t flags, uint32_t mask)
{
struct ifreq ifr;
int fd;
@@ -63,7 +63,7 @@
return -1;
err = ioctl(fd, SIOCGIFFLAGS, &ifr);
if (err) {
- perror("SIOCGIFFLAGS");
+ bb_perror_msg("SIOCGIFFLAGS");
close(fd);
return -1;
}
@@ -72,7 +72,7 @@
ifr.ifr_flags |= mask&flags;
err = ioctl(fd, SIOCSIFFLAGS, &ifr);
if (err)
- perror("SIOCSIFFLAGS");
+ bb_perror_msg("SIOCSIFFLAGS");
}
close(fd);
return err;
@@ -91,7 +91,7 @@
return -1;
err = ioctl(fd, SIOCSIFNAME, &ifr);
if (err) {
- perror("SIOCSIFNAME");
+ bb_perror_msg("SIOCSIFNAME");
close(fd);
return -1;
}
@@ -112,7 +112,7 @@
strncpy(ifr.ifr_name, dev, sizeof(ifr.ifr_name));
ifr.ifr_qlen = qlen;
if (ioctl(s, SIOCSIFTXQLEN, &ifr) < 0) {
- perror("SIOCSIFXQLEN");
+ bb_perror_msg("SIOCSIFXQLEN");
close(s);
return -1;
}
@@ -134,7 +134,7 @@
strncpy(ifr.ifr_name, dev, sizeof(ifr.ifr_name));
ifr.ifr_mtu = mtu;
if (ioctl(s, SIOCSIFMTU, &ifr) < 0) {
- perror("SIOCSIFMTU");
+ bb_perror_msg("SIOCSIFMTU");
close(s);
return -1;
}
@@ -152,14 +152,14 @@
s = socket(PF_PACKET, SOCK_DGRAM, 0);
if (s < 0) {
- perror("socket(PF_PACKET)");
+ bb_perror_msg("socket(PF_PACKET)");
return -1;
}
memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, dev, sizeof(ifr.ifr_name));
if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
- perror("SIOCGIFINDEX");
+ bb_perror_msg("SIOCGIFINDEX");
close(s);
return -1;
}
@@ -169,14 +169,14 @@
me.sll_ifindex = ifr.ifr_ifindex;
me.sll_protocol = htons(ETH_P_LOOP);
if (bind(s, (struct sockaddr*)&me, sizeof(me)) == -1) {
- perror("bind");
+ bb_perror_msg("bind");
close(s);
return -1;
}
alen = sizeof(me);
if (getsockname(s, (struct sockaddr*)&me, &alen) == -1) {
- perror("getsockname");
+ bb_perror_msg("getsockname");
close(s);
return -1;
}
@@ -210,7 +210,7 @@
if (s < 0)
return -1;
if (ioctl(s, brd?SIOCSIFHWBROADCAST:SIOCSIFHWADDR, ifr) < 0) {
- perror(brd?"SIOCSIFHWBROADCAST":"SIOCSIFHWADDR");
+ bb_perror_msg(brd ? "SIOCSIFHWBROADCAST" : "SIOCSIFHWADDR");
close(s);
return -1;
}
@@ -222,8 +222,8 @@
static int do_set(int argc, char **argv)
{
char *dev = NULL;
- __u32 mask = 0;
- __u32 flags = 0;
+ uint32_t mask = 0;
+ uint32_t flags = 0;
int qlen = -1;
int mtu = -1;
char *newaddr = NULL;