config: add defines for keyfile groups to "nm-config.h"

System Internals / NetworkManager - Thomas Haller [redhat.com] - 2 July 2015 08:50 UTC

Some plugins had their local defines for the name of the sections and keys in NMConfig. Move those defines to "nm-config.h".

Usually plugins make use of code in core, but not the other way round. Defining the names inside "nm-config.h" is no violation of that because the config section names are anyway not local to the plugin, but global in the shared name-space with other settings. For example, another plugins shouldn't reuse the section "ifnet". For that reason, it is correct and consistent to move these defines to "nm-config.h". We don't use those names in core, we merely signal their existance.

6d6ab20 config: add defines for keyfile groups to "nm-config.h"
src/nm-config-data.c | 20 +++++++++---------
src/nm-config.c | 34 +++++++++++++++----------------
src/nm-config.h | 14 +++++++++++++
src/settings/plugins/ifnet/net_parser.h | 1 -
src/settings/plugins/ifnet/plugin.c | 5 ++---
src/settings/plugins/ifupdown/plugin.c | 6 ++----
src/settings/plugins/keyfile/plugin.c | 8 ++++----
7 files changed, 49 insertions(+), 39 deletions(-)

Upstream: cgit.freedesktop.org


  • Share