Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp619218ybg; Wed, 23 Oct 2019 03:19:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7dbFjsPlcnJ0ZA85cfQ+xchxNEmatv9Jo4wHJq92Fp0RBG09B3ZgBPRRh/7xOH35UZ4wo X-Received: by 2002:a17:907:40bd:: with SMTP id nu21mr3567260ejb.190.1571825940226; Wed, 23 Oct 2019 03:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571825940; cv=none; d=google.com; s=arc-20160816; b=0YhtJHCBgPTh4g7FO60V5TMXGLQVnKC0Ad2vwvc+fKWL8qrS8WSIb/5TO6uF2d1Skc 12ABRhvnrOOH+GkTMgWyqyNZlBqJaM0FJEdyJedCBRuoaOjHsASU+Swk9B3wD3T2Kmpd XlOBjhsLTjH740AIPamcfdcCuwDuioeFDQ1Lviry8HqsmtiLivkesBoVt0zBZ3mhH2jp p+DM6dRx5IGT8lKoNmp8vWBplft0rwDhsc680HC+noCfLiGNY57r/Spm70+t/ehhtfPH jaWTwVHQ9q6O4pT5j5HMAc9RKnrx2tZGylZ+iTOGpRlM3xGmnqNKApkU+ilYwlpgbqVi h4Rw== 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=EJ5f1WUOHE1nxySLFQA/LRzO7ZgLX+0Z0vrQH1dvSdg=; b=mr+mOk8joODoMJqlMgK9B3m9kLUhykg0mpjoP/GOqPWUT3Ti1SyIxUBhgH7bu6xfgg 5RkeyfLlDP8miZHj57tTovhnM0PWXIRD+GypiS/r7qtVui0Fe0GtqnM0gLpyqRF22Ktr riRIyCoJyunl6hVh0XN6tUhyK31o7+j97p6sNsVOnV12vYCB1jQcqiRr036KEgwCzh0N iJOVMCpgIqZDVJdzEIx3fAv5cSFB6dYu1sxymYIpRm8/FZcwyzfBAupR5zG9RNlPHdq7 jjNU2hrgVmSl2SYONEnY84xmNNRD9CI5AxVcJKxIremqK9qPXIVGfxOBE1gNR82KNbdy cj/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UcKhPQSN; 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=NONE sp=NONE dis=NONE) header.from=kernel.org 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.18.36; Wed, 23 Oct 2019 03:19:00 -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=@kernel.org header.s=default header.b=UcKhPQSN; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404388AbfJWKP0 (ORCPT + 99 others); Wed, 23 Oct 2019 06:15:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:54570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404104AbfJWKP0 (ORCPT ); Wed, 23 Oct 2019 06:15:26 -0400 Received: from linux-8ccs (ip5f5ade78.dynamic.kabel-deutschland.de [95.90.222.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 78868205ED; Wed, 23 Oct 2019 10:15:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571825725; bh=LZP3BqoLpY0rpoQR77DJPDXuMn1MHW9bfkAhcsmqkj4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UcKhPQSN4AqI3CgkCE3D/sIATgU4jNtJhy/qJt3pHsIAMGrNZDDLK9nhDvXNw3BYN 2yvqDXbriHlixSAA50ztaDF5vkkeXA6RrqGBH/1JfLKg1PCaJEhnYuOEnirbUBLOWq Gc4zL1A+OQDcb+sLsW4GoxUhkUqOHQl1B3M0ETq0= Date: Wed, 23 Oct 2019 12:15:21 +0200 From: Jessica Yu To: Matthias Maennich Cc: Masahiro Yamada , Linux Kernel Mailing List , David Laight Subject: Re: [PATCH v3] scripts/nsdeps: use alternative sed delimiter Message-ID: <20191023101520.GA5387@linux-8ccs> References: <20191021160419.28270-1-jeyu@kernel.org> <20191022110403.29715-1-jeyu@kernel.org> <20191023101340.GA27616@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191023101340.GA27616@google.com> X-OS: Linux linux-8ccs 4.12.14-lp150.12.28-default x86_64 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 +++ Matthias Maennich [23/10/19 11:13 +0100]: >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 Applied, thanks! Jessica