From: Marcus Nilsson <brainbomb@gmail.com>
To: connman@lists.linux.dev
Cc: Marcus Nilsson <brainbomb@gmail.com>
Subject: [PATCH] config: Don't warn on `global` section when loading config
Date: Sat, 16 Sep 2023 22:01:15 +0200 [thread overview]
Message-ID: <20230916200115.956547-1-brainbomb@gmail.com> (raw)
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(+)
diff --git a/src/config.c b/src/config.c
index 33fdc737..d2832187 100644
--- a/src/config.c
+++ b/src/config.c
@@ -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]);
--
2.39.2
next reply other threads:[~2023-09-16 20:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-16 20:01 Marcus Nilsson [this message]
2023-11-07 15:05 ` [PATCH] config: Don't warn on `global` section when loading config Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230916200115.956547-1-brainbomb@gmail.com \
--to=brainbomb@gmail.com \
--cc=connman@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).