FSTests Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] common/config: Allow sections names to contain hyphen
@ 2020-06-25 12:37 Nikolay Borisov
  0 siblings, 0 replies; only message in thread
From: Nikolay Borisov @ 2020-06-25 12:37 UTC (permalink / raw)
  To: guaneryu; +Cc: fstests, Nikolay Borisov

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 12:37 [PATCH] common/config: Allow sections names to contain hyphen Nikolay Borisov

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git