Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp615136ybg; Wed, 23 Oct 2019 03:14:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLH8EOLjArrFUP7f8SzOg7a70+zBmOWat65TJauOsbLq/dGMgbpplu0oi0Cv8mcH/rNVYG X-Received: by 2002:a17:906:7202:: with SMTP id m2mr31412176ejk.138.1571825696758; Wed, 23 Oct 2019 03:14:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571825696; cv=none; d=google.com; s=arc-20160816; b=JaiQtT7f8sxCzIn3swvR3FTtsC4K2pkEWJHEahv9REZFNxb4wNKd1PKsxlk4TQ0bnM kGcwZ/dBvlNks1GIyG4wlLbjKqKGYhDbLrjeRWAjM39ohV1e6PEvuEZ3dq/oJZ9JWjc7 rXGknlWfs9yblbSWYwauUCUnrGMke1UsfKdP+0f2AEovRVD2+bum7q+nuPQQ3TcAgxRF rJtLG2+Wg5iAFLOI6yWEXgSTugmeVd1Wcya8HeVOJCq2eorb+SCCCQ5nntQxbUYFZMNe uFY60N2lp5zDwYPvBRy87aqg37UGZ7f2SGXlM+v1ZCSkybehrEyb3vQJxwZS/G8JVXrT xcxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4qw8x64i4XFEDlSAFYgF2VhxflxKizeU9gCHhrw8jfw=; b=u6V56ZDJ4BUfNRNfVx9d5QcQeviU6EfPHJgNcP5z5ptv2mj9f4y1VlDTLWJeQSaiLc eEzYPiaWwDmjAOa95oRw9G9VrY2eygOvGf3G6lZzHp53v0qSCOf4q0lZcscLz6aRFiaT SK2BDydniaJ9O5lLiz4EFVJBQ/K42R6XyCWpJciZXxrwg0wzPCFhScoGbij9dSfvCijn uj9cIIEcOUdp6zMc3nhe9XWRUsjtBklia9SME00vSPefZ8Mkfup0tFo6d8sXpASTe4h4 Mq/fcPZskhsR6oJViCKs9Fw4MDHkdBys6j/pl9NLNi4TZJ3lHyoqYgdRQW/TVAlj+62i fHbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Nh1OJ7aJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n26si4861667ejy.153.2019.10.23.03.14.32; Wed, 23 Oct 2019 03:14:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Nh1OJ7aJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404305AbfJWKNp (ORCPT + 99 others); Wed, 23 Oct 2019 06:13:45 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:36600 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404300AbfJWKNo (ORCPT ); Wed, 23 Oct 2019 06:13:44 -0400 Received: by mail-wr1-f66.google.com with SMTP id w18so20866612wrt.3 for ; Wed, 23 Oct 2019 03:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4qw8x64i4XFEDlSAFYgF2VhxflxKizeU9gCHhrw8jfw=; b=Nh1OJ7aJevO81JAtHvLk1Jt33aeKFq13ZRvSI/dwaK1Rc+O4hYrEMuF+LPjBPamW6M hvMt5QPNnt+EWAeF5CrbTlH+BijHNo1iF2S3CMUP37k+Ws3CXaXP5GAwos7SZl0dlzW4 k3COkFO2cS3oNqQjKITOC7K5YlTDyZiEFKbQ+2FRpjI4DObXKJfO9f1da4yimF7Z4kMo Jb7YggxwHasNVvZMI3NxaDENzDhPwlmJdDBrk9pitYrOmCHoXvarBEAa5D8ROR7Qs66/ Q+WYCzsYGqj2ohsB6DEqDwzKxh2pWPZl7eyjx9z1bIBKxlbsKeJhEZB9SSHYcrmE0kby 4Gzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4qw8x64i4XFEDlSAFYgF2VhxflxKizeU9gCHhrw8jfw=; b=BVmOVB8Jv3O8jWZoSjd/vt05BFCWGY5m44e+ilz2neSpXqYIE4JT4Oekfh2Tkwg/6Q mMmDRGr3xhP+WY70tqBOUxEH72OiP0YbaTHqCsLoy2QVktvzgcx62Re4vk/MmeKnhWoj VRw1jSYLxE8qWX3hOSOOC1CbFaNziOIH2IyQX0K1Aaxfb4HIwIdyJO9eO3AinSqloiov xeKcQa56aylXRQMSfiDdm1c+7CowT76HXiDliTR8oVByC98kjvhur28Gg2waaTQ3Lpxk WpfEmm+tBZwTcQBzE/GuKRpEY/pRqiAXlKoq60At5Q7Zyl8FG5v6JrXfwZcKrxtLsDQO Xaaw== X-Gm-Message-State: APjAAAX6gVIpBKQc1RihTqxCHttg7vmRRC6JZb5NlLEK/GXQoPXBt1GZ 8O2VjRxjmIf6pICLsD9QVxScQg== X-Received: by 2002:adf:e651:: with SMTP id b17mr7298903wrn.191.1571825621824; Wed, 23 Oct 2019 03:13:41 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:e8f7:125b:61e9:733d]) by smtp.gmail.com with ESMTPSA id b186sm3144466wmb.21.2019.10.23.03.13.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2019 03:13:41 -0700 (PDT) Date: Wed, 23 Oct 2019 11:13:40 +0100 From: Matthias Maennich To: Masahiro Yamada Cc: Jessica Yu , Linux Kernel Mailing List , David Laight Subject: Re: [PATCH v3] scripts/nsdeps: use alternative sed delimiter Message-ID: <20191023101340.GA27616@google.com> References: <20191021160419.28270-1-jeyu@kernel.org> <20191022110403.29715-1-jeyu@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 23, 2019 at 10:23:39AM +0900, Masahiro Yamada wrote: >On Tue, Oct 22, 2019 at 8:04 PM Jessica Yu wrote: >> >> When doing an out of tree build with O=, the nsdeps script constructs >> the absolute pathname of the module source file so that it can insert >> MODULE_IMPORT_NS statements in the right place. However, ${srctree} >> contains an unescaped path to the source tree, which, when used in a sed >> substitution, makes sed complain: >> >> ++ sed 's/[^ ]* *//home/jeyu/jeyu-linux\/&/g' >> sed: -e expression #1, char 12: unknown option to `s' >> >> The sed substitution command 's' ends prematurely with the forward >> slashes in the pathname, and sed errors out when it encounters the 'h', >> which is an invalid sed substitution option. To avoid escaping forward >> slashes ${srctree}, we can use '|' as an alternative delimiter for >> sed instead to avoid this error. >> >> Signed-off-by: Jessica Yu >> --- >> >> v3: don't need to escape '/' since we're using a different delimiter. >> >> scripts/nsdeps | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/scripts/nsdeps b/scripts/nsdeps >> index 3754dac13b31..dda6fbac016e 100644 >> --- a/scripts/nsdeps >> +++ b/scripts/nsdeps >> @@ -33,7 +33,7 @@ generate_deps() { >> if [ ! -f "$ns_deps_file" ]; then return; fi >> local mod_source_files=`cat $mod_file | sed -n 1p \ >> | sed -e 's/\.o/\.c/g' \ >> - | sed "s/[^ ]* */${srctree}\/&/g"` >> + | sed "s|[^ ]* *|${srctree}/&|g"` >> for ns in `cat $ns_deps_file`; do >> echo "Adding namespace $ns to module $mod_name (if needed)." >> generate_deps_for_ns $ns $mod_source_files >> -- >> 2.16.4 >> > >Reviewed-by: Masahiro Yamada > Tested-by: Matthias Maennich Cheers, Matthias