Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5794215ybg; Tue, 22 Oct 2019 08:28:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaTm8bMTg7mhTkEZMPwzS8TqOPk3Afq47v/zV/MDmI5vnCB3ifhe7UgJilzMAkBhxuybrG X-Received: by 2002:a17:906:524b:: with SMTP id y11mr27179611ejm.82.1571758127416; Tue, 22 Oct 2019 08:28:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571758127; cv=none; d=google.com; s=arc-20160816; b=VpResHLvR93RefGz1SPOnyGnbNMJxCNdtTbnIhG4S9ILQJ0oJymnKXMrIzS2Fcq9Zj eTOgzNm8ru9l3Y+WTFRPif6rVIDJFAy7UKrmKE0TFxoB7rIfoU1Mf0PEjdvl4n+frL8C iqT5KfO9NXhiHtmxqvGTCpf25lYjRCWJLfE339lVRQzlMuT4sbsEytNA4od1iyEfEWTi ZFjRu/fzDmwZeD+38+XbEQ++tLCP824Kz3AUhhkmHgfuBN5G0J/bb2tXuI1elyJEZQaZ QDnvLvORDG7ehcpNqnWN9vcRXIkoVYd7MwbqECzIarONcDVypOjvHhSeh6z91+0yB6Do 6q+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=ScZOa8V4/6XzNIWehdnbmtQLngR0CbodTf8aJTd0m0A=; b=MOGjBGCIf1VyrOoao6wRpxyL1IurTvRYBXMiMj4sOI9d/hLKDxuwhxR2f1eSZg0Ems QjQFQj5ENziSHWVOqaIBoaLUwfIl36a3W+hgtp4pb0VO9mzfO+5v8TDaWVCLVthxm3hX nZDsVnKILt3KfLQMThjq4uV8ZSCZmnGkV+SfAKh7nXD7QzE+0TS5lleE0SXieCu8SOR8 g7LIrWnUlqz3U9+Qp1SgwfsSClhCh+RBAJh3wMSuWZfDK25L1thpztNiFRk9WhbrE3Ag t3av4SK03d6rHdXN0tyl3JGAJL1nkyfWd364Fu4ntUK12r6SxcYvmn5tNdKOddDaz2M3 K+jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SSubpzME; 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 rl13si11413617ejb.228.2019.10.22.08.27.33; Tue, 22 Oct 2019 08:28:47 -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=SSubpzME; 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 S1730556AbfJVLEP (ORCPT + 99 others); Tue, 22 Oct 2019 07:04:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:53134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729458AbfJVLEO (ORCPT ); Tue, 22 Oct 2019 07:04:14 -0400 Received: from linux-8ccs.suse.cz (ip5f5ade81.dynamic.kabel-deutschland.de [95.90.222.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BABB72184C; Tue, 22 Oct 2019 11:04:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571742253; bh=dx/S7X7xlxDH2/Ivln7aj+hAf93S/iBfkZvcLWS9HuY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SSubpzMEKNnVIrEhijpMg66rLSZ4kuBBe+lbUbvSLLH2CY0BcAWH62iGFMucCgh01 ANkzsACwD8AySLRS1ogA822MdpKqF7qgrAZkirrPRN1/WwhskpkBRCP9vSpD0npeid i0g7kVDVY1wQsqD4GEPikZrC3hDPufiap6B4WbEc= From: Jessica Yu To: linux-kernel@vger.kernel.org Cc: Matthias Maennich , Masahiro Yamada , David Laight , Jessica Yu Subject: [PATCH v3] scripts/nsdeps: use alternative sed delimiter Date: Tue, 22 Oct 2019 13:04:03 +0200 Message-Id: <20191022110403.29715-1-jeyu@kernel.org> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191021160419.28270-1-jeyu@kernel.org> References: <20191021160419.28270-1-jeyu@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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