From 434c93ddfbc53de7fcfc55954e4451600debe092 Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Tue, 19 Dec 2023 18:15:58 +1000 Subject: [PATCH] net: conn_mgr: output events as hex Networking events are masks of bits, which are almost impossible to read as decimal, and trivial to read as hex. Also unifies the format string across multiple outputs for some flash savings. Signed-off-by: Jordan Yates --- subsys/net/conn_mgr/events_handler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subsys/net/conn_mgr/events_handler.c b/subsys/net/conn_mgr/events_handler.c index c02787bf4f..21677770ce 100644 --- a/subsys/net/conn_mgr/events_handler.c +++ b/subsys/net/conn_mgr/events_handler.c @@ -24,7 +24,7 @@ static void conn_mgr_iface_events_handler(struct net_mgmt_event_callback *cb, { int idx; - NET_DBG("Iface event %u received on iface %d (%p)", mgmt_event, + NET_DBG("%s event 0x%x received on iface %d (%p)", "Iface", mgmt_event, net_if_get_by_iface(iface), iface); if ((mgmt_event & CONN_MGR_IFACE_EVENTS_MASK) != mgmt_event) { @@ -62,7 +62,7 @@ static void conn_mgr_ipv6_events_handler(struct net_mgmt_event_callback *cb, { int idx; - NET_DBG("IPv6 event %u received on iface %d (%p)", mgmt_event, + NET_DBG("%s event 0x%x received on iface %d (%p)", "IPv6", mgmt_event, net_if_get_by_iface(iface), iface); if ((mgmt_event & CONN_MGR_IPV6_EVENTS_MASK) != mgmt_event) { @@ -120,7 +120,7 @@ static void conn_mgr_ipv4_events_handler(struct net_mgmt_event_callback *cb, { int idx; - NET_DBG("IPv4 event %u received on iface %d (%p)", mgmt_event, + NET_DBG("%s event 0x%x received on iface %d (%p)", "IPv4", mgmt_event, net_if_get_by_iface(iface), iface); if ((mgmt_event & CONN_MGR_IPV4_EVENTS_MASK) != mgmt_event) {