From patchwork Thu Jun 25 12:37:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 11625027 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37CB414B7 for ; Thu, 25 Jun 2020 12:37:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25A97206BE for ; Thu, 25 Jun 2020 12:37:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404285AbgFYMhs (ORCPT ); Thu, 25 Jun 2020 08:37:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:39242 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404610AbgFYMhs (ORCPT ); Thu, 25 Jun 2020 08:37:48 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DC829AC90; Thu, 25 Jun 2020 12:37:46 +0000 (UTC) From: Nikolay Borisov To: guaneryu@gmail.com Cc: fstests@vger.kernel.org, Nikolay Borisov Subject: [PATCH] common/config: Allow sections names to contain hyphen Date: Thu, 25 Jun 2020 15:37:44 +0300 Message-Id: <20200625123744.17812-1-nborisov@suse.com> X-Mailer: git-send-email 2.17.1 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org 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 --- 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