summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-11-10 10:39:38 +0100
committerLubomir Rintel <lkundrak@v3.sk>2017-12-11 10:30:26 +0100
commitffe89f86e0116c49eb93cb2b19894f1715f66148 (patch)
tree9c9c4b4c93eb76f89bf564bc9b50a946c3312592
parent273fb58e35d70a44d4b490af3a2212b04d6d7aab (diff)
downloadNetworkManager-ffe89f86e0116c49eb93cb2b19894f1715f66148.tar.gz
platform/linux: stringify also NLMSG_* in logs
-rw-r--r--src/platform/nm-linux-platform.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index dbe04b82aa..a1fe17ef29 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -941,17 +941,21 @@ _nl_nlmsghdr_to_str (const struct nlmsghdr *hdr, char *buf, gsize len)
b = buf;
switch (hdr->nlmsg_type) {
- case RTM_NEWLINK: s = "NEWLINK"; break;
- case RTM_DELLINK: s = "DELLINK"; break;
- case RTM_NEWADDR: s = "NEWADDR"; break;
- case RTM_DELADDR: s = "DELADDR"; break;
- case RTM_NEWROUTE: s = "NEWROUTE"; break;
- case RTM_DELROUTE: s = "DELROUTE"; break;
- default: s = NULL; break;
+ case RTM_NEWLINK: s = "RTM_NEWLINK"; break;
+ case RTM_DELLINK: s = "RTM_DELLINK"; break;
+ case RTM_NEWADDR: s = "RTM_NEWADDR"; break;
+ case RTM_DELADDR: s = "RTM_DELADDR"; break;
+ case RTM_NEWROUTE: s = "RTM_NEWROUTE"; break;
+ case RTM_DELROUTE: s = "RTM_DELROUTE"; break;
+ case NLMSG_NOOP: s = "NLMSG_NOOP"; break;
+ case NLMSG_ERROR: s = "NLMSG_ERROR"; break;
+ case NLMSG_DONE: s = "NLMSG_DONE"; break;
+ case NLMSG_OVERRUN: s = "NLMSG_OVERRUN"; break;
+ default: s = NULL; break;
}
if (s)
- nm_utils_strbuf_append (&buf, &len, "RTM_%s", s);
+ nm_utils_strbuf_append_str (&buf, &len, s);
else
nm_utils_strbuf_append (&buf, &len, "(%u)", (unsigned) hdr->nlmsg_type);