summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2018-07-20 13:34:52 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-07-20 22:53:17 +0200
commit6793a1f771556c2d28122171e147094cba8fefc4 (patch)
tree1efce58f4542bd10364dfd5276b1d2708185bb4d /devtools
parent6a015363b3eacf1f2d245734a58c9dfd47bc386d (diff)
downloaddpdk-6793a1f771556c2d28122171e147094cba8fefc4.zip
dpdk-6793a1f771556c2d28122171e147094cba8fefc4.tar.gz
dpdk-6793a1f771556c2d28122171e147094cba8fefc4.tar.xz
devtools: fix checkpatch for filename with space
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 <thomas@monjalon.net> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/checkpatches.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 1439bce..e97a4f2 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 () { # <patch> <commit> <title>
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'