summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2018-07-18 23:26:58 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-07-20 11:37:26 +0200
commit084ca5728420f6afd6f617b8c7a88a4feb79053e (patch)
tree1ce9b3d064cb15fefa828cbfb456cc5209747b93 /devtools
parentdd536a8bc5bb1f2b7e530272c9a2d2c15c7fdb32 (diff)
downloaddpdk-next-eventdev-084ca5728420f6afd6f617b8c7a88a4feb79053e.zip
dpdk-next-eventdev-084ca5728420f6afd6f617b8c7a88a4feb79053e.tar.gz
dpdk-next-eventdev-084ca5728420f6afd6f617b8c7a88a4feb79053e.tar.xz
devtools: fix symbol check for filename with space
If the patch filename or the temporary file path have a space in their name, the script check-symbol-change.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/check-symbol-change.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index 9952a8d..40b7207 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -7,7 +7,7 @@ build_map_changes()
local fname=$1
local mapdb=$2
- cat $fname | awk '
+ cat "$fname" | awk '
# Initialize our variables
BEGIN {map="";sym="";ar="";sec=""; in_sec=0; in_map=0}
@@ -71,10 +71,10 @@ build_map_changes()
print map " " sym " unknown del"
}
}
- }' > ./$mapdb
+ }' > "$mapdb"
- sort -u $mapdb > ./$mapdb.2
- mv -f $mapdb.2 $mapdb
+ sort -u "$mapdb" > "$mapdb.2"
+ mv -f "$mapdb.2" "$mapdb"
}
@@ -111,7 +111,7 @@ check_for_rule_violations()
# to be moving from an already supported
# section or its a violation
grep -q \
- "$mname $symname [^EXPERIMENTAL] del" $mapdb
+ "$mname $symname [^EXPERIMENTAL] del" "$mapdb"
if [ $? -ne 0 ]
then
echo -n "ERROR: symbol $symname "
@@ -133,7 +133,7 @@ check_for_rule_violations()
echo "gone through the deprecation process"
fi
fi
- done < $mapdb
+ done < "$mapdb"
return $ret
}
@@ -146,14 +146,14 @@ exit_code=1
clean_and_exit_on_sig()
{
- rm -f $mapfile
+ rm -f "$mapfile"
exit $exit_code
}
-build_map_changes $patch $mapfile
-check_for_rule_violations $mapfile
+build_map_changes "$patch" "$mapfile"
+check_for_rule_violations "$mapfile"
exit_code=$?
-rm -f $mapfile
+rm -f "$mapfile"
exit $exit_code