]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Better logging for ioctl set flags failure
authorBen Greear <greearb@candelatech.com>
Sat, 4 Aug 2012 17:41:35 +0000 (20:41 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 4 Aug 2012 17:41:35 +0000 (20:41 +0300)
Let user know if the call failed setting interface up vs. down.

Signed-hostap: Ben Greear <greearb@candelatech.com>

src/drivers/linux_ioctl.c

index 940b69afe3767d983e4641e56b5e1c6713ffcd92..4380428f979c77dc09257fce0f34ef3e91a3a06b 100644 (file)
@@ -45,8 +45,9 @@ int linux_set_iface_flags(int sock, const char *ifname, int dev_up)
 
        if (ioctl(sock, SIOCSIFFLAGS, &ifr) != 0) {
                ret = errno ? -errno : -999;
-               wpa_printf(MSG_ERROR, "Could not set interface %s flags: %s",
-                          ifname, strerror(errno));
+               wpa_printf(MSG_ERROR, "Could not set interface %s flags (%s): "
+                          "%s",
+                          ifname, dev_up ? "UP" : "DOWN", strerror(errno));
                return ret;
        }