From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 4F9D129D2 for ; Fri, 20 Jul 2018 20:25:54 +0200 (CEST) Received: from [12.216.72.9] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1fga5z-00023V-U9; Fri, 20 Jul 2018 14:25:51 -0400 Date: Fri, 20 Jul 2018 14:25:38 -0400 From: Neil Horman To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20180720182538.GA21786@neilslaptop.think-freely.org> References: <20180720114103.18211-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180720114103.18211-1-thomas@monjalon.net> User-Agent: Mutt/1.9.5 (2018-04-13) X-Spam-Score: -2.9 (--) X-Spam-Status: No Subject: Re: [dpdk-dev] [PATCH] devtools: fix checkpatch for filename with space X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 18:25:54 -0000 On Fri, Jul 20, 2018 at 01:41:03PM +0200, Thomas Monjalon wrote: > If the patch filename or the temporary file path have a space > in their name, the script checkpatches.sh does not work. > The variables for the filenames must be enclosed in quotes > in order to preserve spaces. > > Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") > > Signed-off-by: Thomas Monjalon Acked-by: Neil Horman > --- > > Strangely, I did a fix for check-symbol-change.sh and I forgot > to fix checkpatches.sh. > > --- > devtools/checkpatches.sh | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh > index 1439bce94..e97a4f2c9 100755 > --- a/devtools/checkpatches.sh > +++ b/devtools/checkpatches.sh > @@ -25,7 +25,7 @@ NEW_TYPEDEFS,COMPARISON_TO_NULL" > > clean_tmp_files() { > if echo $tmpinput | grep -q '^checkpatches\.' ; then > - rm -f $tmpinput > + rm -f "$tmpinput" > fi > } > > @@ -77,13 +77,13 @@ check () { # > elif [ -n "$2" ] ; then > tmpinput=$(mktemp checkpatches.XXXXXX) > git format-patch --find-renames \ > - --no-stat --stdout -1 $commit > $tmpinput > + --no-stat --stdout -1 $commit > "$tmpinput" > else > tmpinput=$(mktemp checkpatches.XXXXXX) > - cat > $tmpinput > + cat > "$tmpinput" > fi > > - report=$($DPDK_CHECKPATCH_PATH $options $tmpinput 2>/dev/null) > + report=$($DPDK_CHECKPATCH_PATH $options "$tmpinput" 2>/dev/null) > if [ $? -ne 0 ] ; then > $verbose || printf '\n### %s\n\n' "$3" > printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p' > -- > 2.17.1 > >