mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-29 05:39:24 +01:00
monitor: Fix printing of nlmsgerr netlink messages
This commit is contained in:
parent
e0eb824fe3
commit
45ce4bc8eb
@ -6108,9 +6108,10 @@ static void print_nlmsg(const struct timeval *tv, const struct nlmsghdr *nlmsg)
|
|||||||
switch (nlmsg->nlmsg_type) {
|
switch (nlmsg->nlmsg_type) {
|
||||||
case NLMSG_ERROR:
|
case NLMSG_ERROR:
|
||||||
err = NLMSG_DATA(nlmsg);
|
err = NLMSG_DATA(nlmsg);
|
||||||
status = -err->error;
|
status = err->error;
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
print_field("Error: %d (%s)", status, strerror(status));
|
print_field("Error: %d (%s)",
|
||||||
|
status, strerror(-status));
|
||||||
else
|
else
|
||||||
print_field("ACK: %d", status);
|
print_field("ACK: %d", status);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user