summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-11-14 14:52:21 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2018-12-01 15:16:48 +0100
commit446e5b27d665c053199a4fd27d2c69624164758e (patch)
tree1ff4d2bea82baeaf85e370514f951aac2577d3a4 /shared
parent2e45d4ada6664dd47733c87d1495a960683a87ff (diff)
core: add checks on connection default properties
Add a new CON_DEFAULT() macro that places a property name into a special section used at runtime to check whether it is a supported connection default. Unfortunately, this mechanism doesn't work for plugins so we have to enumerate the connection defaults from plugins in the daemon using another CON_DEFAULT_NOP() macro.
Diffstat (limited to 'shared')
-rw-r--r--shared/nm-utils/nm-macros-internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/shared/nm-utils/nm-macros-internal.h b/shared/nm-utils/nm-macros-internal.h
index 82e1e02b4..24105de1c 100644
--- a/shared/nm-utils/nm-macros-internal.h
+++ b/shared/nm-utils/nm-macros-internal.h
@@ -34,10 +34,12 @@
#define _nm_packed __attribute__ ((packed))
#define _nm_unused __attribute__ ((unused))
+#define _nm_used __attribute__ ((used))
#define _nm_pure __attribute__ ((pure))
#define _nm_const __attribute__ ((const))
#define _nm_printf(a,b) __attribute__ ((__format__ (__printf__, a, b)))
#define _nm_align(s) __attribute__ ((aligned (s)))
+#define _nm_section(s) __attribute__ ((section (s)))
#define _nm_alignof(type) __alignof (type)
#define _nm_alignas(type) _nm_align (_nm_alignof (type))
#define nm_auto(fcn) __attribute__ ((cleanup(fcn)))