diff mbox

[6/7] hostap: Better logging for ioctl set flags failure.

Message ID 1341593561-14090-6-git-send-email-greearb@candelatech.com
State Accepted
Commit addde1399ec4f5ddf448ad738274e1fb6c9d9b03
Headers show

Commit Message

Ben Greear July 6, 2012, 4:52 p.m. UTC
From: Ben Greear <greearb@candelatech.com>

Let user know if the call failed setting interface up v/s
down.

Signed-hostap: Ben Greear <greearb@candelatech.com>
---
 src/drivers/linux_ioctl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Jouni Malinen Aug. 4, 2012, 5:42 p.m. UTC | #1
On Fri, Jul 06, 2012 at 09:52:40AM -0700, greearb@candelatech.com wrote:
> Let user know if the call failed setting interface up v/s
> down.

Thanks, applied.
diff mbox

Patch

diff --git a/src/drivers/linux_ioctl.c b/src/drivers/linux_ioctl.c
index 940b69a..9d46254 100644
--- a/src/drivers/linux_ioctl.c
+++ b/src/drivers/linux_ioctl.c
@@ -45,8 +45,8 @@  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;
 	}