From: Nikolay Borisov <nborisov@suse.com>
To: guaneryu@gmail.com
Cc: fstests@vger.kernel.org, Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH] common/config: Allow sections names to contain hyphen
Date: Thu, 25 Jun 2020 15:37:44 +0300 [thread overview]
Message-ID: <20200625123744.17812-1-nborisov@suse.com> (raw)
Current regular expression in get_config_sections allows section names
to consist of alphanumeric character and underscore. Extend it to
also allow the hyphen '-' character.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
common/config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/config b/common/config
index 8023273da115..63d486125a76 100644
--- a/common/config
+++ b/common/config
@@ -449,7 +449,7 @@ known_hosts()
# in the section name otherwise the section will not be resognised.
# Section name must be contained between square brackets.
get_config_sections() {
- sed -n -e "s/^\[\([[:alnum:]_]*\)\]/\1/p" < $1
+ sed -n -e "s/^\[\([[:alnum:]_-]*\)\]/\1/p" < $1
}
if [ ! -f "$HOST_OPTIONS" ]; then
--
2.17.1
next reply other threads:[~2020-06-25 12:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 12:37 Nikolay Borisov [this message]
2020-08-26 16:04 ` [PATCH] common/config: Allow sections names to contain hyphen Nikolay Borisov
2020-08-30 16:25 ` Eryu Guan
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=20200625123744.17812-1-nborisov@suse.com \
--to=nborisov@suse.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
/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 NNTP newsgroup(s).