summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-04-10 13:23:28 +0300
committerTobias Klauser <tklauser@distanz.ch>2015-04-10 14:16:31 +0200
commit06200b94b91cdf80d23a15de00145147ffd1174e (patch)
tree7abadda760a92eec3339e88c0e0ff477aec03e91
parentbb77b49265877b68fc316d11a719527ecf91d594 (diff)
mac80211: Print libnl error message along with error number
Add printing libnl error message like: nl80211 returned with error (-23): Object type does not match cache instead of: nl80211 returned with error -23 Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--mac80211.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mac80211.c b/mac80211.c
index 326cf65..c089574 100644
--- a/mac80211.c
+++ b/mac80211.c
@@ -116,7 +116,8 @@ static int nl80211_error_handler(struct sockaddr_nl *nla __maybe_unused,
struct nlmsgerr *err,
void *arg __maybe_unused)
{
- panic("nl80211 returned with error %d\n", err->error);
+ panic("nl80211 returned with error (%d): %s\n", err->error,
+ nl_geterror(err->error));
}
static int nl80211_add_mon_if(struct nl80211_state *state, const char *device,