start_stop_daemon: NOMMU fixes, round 2 by Alex Landau <landau_alex@yahoo.com>
[oweals/busybox.git] / networking / vconfig.c
index 003c1a8f7fef84bf174bd32feb455de90153417a..4776e13248b4c8e766fb66210efaf5b0c2476e1c 100644 (file)
@@ -9,7 +9,7 @@
 
 /* BB_AUDIT SUSv3 N/A */
 
-#include "busybox.h"
+#include "libbb.h"
 #include <net/if.h>
 
 /* Stuff from linux/if_vlan.h, kernel version 2.4.23 */
@@ -106,6 +106,7 @@ static const char name_types[] = {
 
 static const char conf_file_name[] = "/proc/net/vlan/config";
 
+int vconfig_main(int argc, char **argv);
 int vconfig_main(int argc, char **argv)
 {
        struct vlan_ioctl_args ifr;
@@ -156,9 +157,8 @@ int vconfig_main(int argc, char **argv)
        }
 
        fd = xsocket(AF_INET, SOCK_STREAM, 0);
-       if (ioctl(fd, SIOCSIFVLAN, &ifr) < 0) {
-               bb_perror_msg_and_die("ioctl error for %s", *argv);
-       }
+       ioctl_or_perror_and_die(fd, SIOCSIFVLAN, &ifr,
+                                               "ioctl error for %s", *argv);
 
        return 0;
 }