From 06200b94b91cdf80d23a15de00145147ffd1174e Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Fri, 10 Apr 2015 13:23:28 +0300 Subject: 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 Signed-off-by: Tobias Klauser --- mac80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3-54-g00ecf