diff options
| author | Michael Biebl <biebl@debian.org> | 2018-04-23 18:01:04 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-04-23 18:01:04 +0200 |
| commit | d00e17d14b5df5f7fcba1a17f91edbb3180fbf64 (patch) | |
| tree | 2b16542fff332a3c38fb2191f7ae4d4795f66451 /src/nm-logging.h | |
| parent | 2e03b565aa24225ca4992797a5d563542b0b2bdd (diff) | |
| parent | f60117b41d5433be1b4a96d82cd11d0c3dce9b63 (diff) | |
Update upstream source from tag 'upstream/1.11.3'
Update to upstream version '1.11.3' with Debian dir a3a34e6c602cb81e76dc3c255c617e7f7ecfc11c
Diffstat (limited to 'src/nm-logging.h')
| -rw-r--r-- | src/nm-logging.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nm-logging.h b/src/nm-logging.h index 8fcbc8cc..36ba6a5a 100644 --- a/src/nm-logging.h +++ b/src/nm-logging.h @@ -83,6 +83,16 @@ typedef enum { /*< skip >*/ LOGD_IP = LOGD_IP4 | LOGD_IP6, } NMLogDomain; +static inline NMLogDomain +LOGD_IP_from_af (int addr_family) +{ + switch (addr_family) { + case AF_INET: return LOGD_IP4; + case AF_INET6: return LOGD_IP6; + } + g_return_val_if_reached (LOGD_NONE); +} + /* Log levels */ typedef enum { /*< skip >*/ LOGL_TRACE, @@ -123,7 +133,7 @@ typedef enum { /*< skip >*/ ""__VA_ARGS__); \ } G_STMT_END -/* nm_log() only evaluates it's argument list after checking +/* nm_log() only evaluates its argument list after checking * whether logging for the given level/domain is enabled. */ #define nm_log(level, domain, ifname, con_uuid, ...) \ G_STMT_START { \ |