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>
This commit is contained in:
parent
481cac211e
commit
addde1399e
1 changed files with 3 additions and 2 deletions
|
@ -45,8 +45,9 @@ int linux_set_iface_flags(int sock, const char *ifname, int dev_up)
|
||||||
|
|
||||||
if (ioctl(sock, SIOCSIFFLAGS, &ifr) != 0) {
|
if (ioctl(sock, SIOCSIFFLAGS, &ifr) != 0) {
|
||||||
ret = errno ? -errno : -999;
|
ret = errno ? -errno : -999;
|
||||||
wpa_printf(MSG_ERROR, "Could not set interface %s flags: %s",
|
wpa_printf(MSG_ERROR, "Could not set interface %s flags (%s): "
|
||||||
ifname, strerror(errno));
|
"%s",
|
||||||
|
ifname, dev_up ? "UP" : "DOWN", strerror(errno));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue