mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 19:00:11 +01:00
ndisc: log the device context
This commit is contained in:
parent
bc8d4c0366
commit
c307163b77
1 changed files with 5 additions and 7 deletions
|
|
@ -58,16 +58,14 @@ gboolean nm_ndisc_add_dns_domain (NMNDisc *ndisc, const NMNDiscDNSDoma
|
|||
if (nm_logging_enabled (__level, __domain)) { \
|
||||
NMNDisc *const __self = (self); \
|
||||
char __prefix[64]; \
|
||||
const char *__ifname = __self ? nm_ndisc_get_ifname (__self) : NULL; \
|
||||
\
|
||||
_nm_log (__level, __domain, 0, NULL, NULL, \
|
||||
_nm_log (__level, __domain, 0, __ifname, NULL, \
|
||||
"%s: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \
|
||||
(__self \
|
||||
? ({ \
|
||||
const char *__ifname = nm_ndisc_get_ifname (__self); \
|
||||
nm_sprintf_buf (__prefix, "%s[%p,%s%s%s]", \
|
||||
_NMLOG_PREFIX_NAME, __self, \
|
||||
NM_PRINT_FMT_QUOTE_STRING (__ifname)); \
|
||||
}) \
|
||||
? nm_sprintf_buf (__prefix, "%s[%p,%s%s%s]", \
|
||||
_NMLOG_PREFIX_NAME, __self, \
|
||||
NM_PRINT_FMT_QUOTE_STRING (__ifname)) \
|
||||
: _NMLOG_PREFIX_NAME) \
|
||||
_NM_UTILS_MACRO_REST (__VA_ARGS__)); \
|
||||
} \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue