Skip to contentSkip to conversation

config: Don't warn on `global` section when loading config

PATCH In review Marcus Nilsson 2 participants 2 messages Sep 16, 2023 – Nov 7, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config: Don't warn on `global` section when loading config

Since the global section is supported and already validated in load_config(), skip over it without issuing the warning about it being ignored.

---
 src/config.c | 3 +++
 1 file changed, 3 insertions(+)
src/config.c +3 -0
index 33fdc737..d2832187 100644
@@ -819,6 +819,9 @@ static bool load_service_from_keyfile(GKeyFile *keyfile,
 	groups = g_key_file_get_groups(keyfile, NULL);
 
 	for (i = 0; groups[i]; i++) {
+		if (g_strcmp0(groups[i], "global") == 0)
+			continue;
+
 		if (!g_str_has_prefix(groups[i], "service_")) {
 			connman_warn("Ignore group named '%s' because prefix "
 				"is not 'service_'", groups[i]);
Signature · 1 line
2.39.2
#1 lore raw

Hi Marcus,

Quoted 6 lines

Since the global section is supported and already validated in load_config(), skip over it without issuing the warning about it being ignored.
---
src/config.c | 3 +++

1 file changed, 3 insertions(+)

patch has been applied.

Regards

Marcel