summaryrefslogtreecommitdiff
path: root/clients/cli/utils.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-04-26 17:26:52 +0200
committerThomas Haller <thaller@redhat.com>2018-05-14 17:53:03 +0200
commit69d5fc9bcebecde08901b3d03688405758ce63b4 (patch)
tree45c191705422966eff719edc956695fb8f48a62f /clients/cli/utils.h
parent0cba6bf1d2b9f2474bfdb521f290cc4c3d650354 (diff)
downloadNetworkManager-69d5fc9bcebecde08901b3d03688405758ce63b4.tar.gz
cli: add and use macro for creating NmcMetaGenericInfo parent groups
Diffstat (limited to 'clients/cli/utils.h')
-rw-r--r--clients/cli/utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/clients/cli/utils.h b/clients/cli/utils.h
index 883e73188c..6c0d1f4735 100644
--- a/clients/cli/utils.h
+++ b/clients/cli/utils.h
@@ -159,6 +159,12 @@ struct _NmcMetaGenericInfo {
#define NMC_META_GENERIC_WITH_NESTED(n, nest, ...) \
NMC_META_GENERIC (n, .nested = (nest), __VA_ARGS__)
+#define NMC_META_GENERIC_GROUP(_group_name, _nested, _name_header) \
+ ((const NMMetaAbstractInfo *const*) ((const NmcMetaGenericInfo *const[]) { \
+ NMC_META_GENERIC_WITH_NESTED (_group_name,_nested, .name_header = _name_header), \
+ NULL, \
+ }))
+
/*****************************************************************************/
gboolean nmc_print (const NmcConfig *nmc_config,