aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2012-08-04 17:41:35 (GMT)
committerJouni Malinen <j@w1.fi>2012-08-04 17:41:35 (GMT)
commitaddde1399ec4f5ddf448ad738274e1fb6c9d9b03 (patch)
tree9276a254eebb58b639544f01b2cd2410e913d864
parent481cac211e6badb2042ba278b8c47bff45439e5b (diff)
downloadhostap-addde1399ec4f5ddf448ad738274e1fb6c9d9b03.zip
hostap-addde1399ec4f5ddf448ad738274e1fb6c9d9b03.tar.gz
hostap-addde1399ec4f5ddf448ad738274e1fb6c9d9b03.tar.bz2
Better logging for ioctl set flags failure
Let user know if the call failed setting interface up vs. down. Signed-hostap: Ben Greear <greearb@candelatech.com>
-rw-r--r--src/drivers/linux_ioctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/linux_ioctl.c b/src/drivers/linux_ioctl.c
index 940b69a..4380428 100644
--- a/src/drivers/linux_ioctl.c
+++ b/src/drivers/linux_ioctl.c
@@ -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;
}