summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2018-09-19 19:16:29 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-10-01 23:51:45 +0200
commitff37ca5d3773b7c82ad9b3d7e212e8ae7d39fc1a (patch)
treee3a659fd8b9d67699e685f8ad65237687daff1cd /devtools
parent8f3ea0a03dce3d42f83915201395605d4b63d347 (diff)
downloaddpdk-ff37ca5d3773b7c82ad9b3d7e212e8ae7d39fc1a.zip
dpdk-ff37ca5d3773b7c82ad9b3d7e212e8ae7d39fc1a.tar.gz
dpdk-ff37ca5d3773b7c82ad9b3d7e212e8ae7d39fc1a.tar.xz
devtools: use a common prefix for temporary files
Some temporary files were generated in /tmp, others in the current directory, and none was "dpdk prefixed". All these files have a common path prefix now: $TMPDIR/dpdk. TMPDIR is /tmp by default. Note: the previous use of mktemp, with a template but without -t, was generating a file in the current directory. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/check-includes.sh4
-rwxr-xr-xdevtools/check-symbol-change.sh2
-rwxr-xr-xdevtools/checkpatches.sh4
-rwxr-xr-xdevtools/cocci.sh2
4 files changed, 6 insertions, 6 deletions
diff --git a/devtools/check-includes.sh b/devtools/check-includes.sh
index 9057633..ba9d00b 100755
--- a/devtools/check-includes.sh
+++ b/devtools/check-includes.sh
@@ -90,11 +90,11 @@ include_dir=${1:-build/include}
'rte_eth_vhost.h' \
}
-temp_cc=/tmp/${0##*/}.$$.c
+temp_cc=$(mktemp -t dpdk.${0##*/}.XXX.c)
pass_cc=
failures_cc=0
-temp_cxx=/tmp/${0##*/}.$$.cc
+temp_cxx=$(mktemp -t dpdk.${0##*/}.XXX.cc)
pass_cxx=
failures_cxx=0
diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index cf9cfc7..c0d2a6d 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -140,7 +140,7 @@ check_for_rule_violations()
trap clean_and_exit_on_sig EXIT
-mapfile=`mktemp mapdb.XXXXXX`
+mapfile=`mktemp -t dpdk.mapdb.XXXXXX`
patch=$1
exit_code=1
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index dbed422..bf3114f 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -90,11 +90,11 @@ check () { # <patch> <commit> <title>
if [ -n "$1" ] ; then
tmpinput=$1
elif [ -n "$2" ] ; then
- tmpinput=$(mktemp checkpatches.XXXXXX)
+ tmpinput=$(mktemp -t dpdk.checkpatches.XXXXXX)
git format-patch --find-renames \
--no-stat --stdout -1 $commit > "$tmpinput"
else
- tmpinput=$(mktemp checkpatches.XXXXXX)
+ tmpinput=$(mktemp -t dpdk.checkpatches.XXXXXX)
cat > "$tmpinput"
fi
diff --git a/devtools/cocci.sh b/devtools/cocci.sh
index 4ca5025..8b17a8c 100755
--- a/devtools/cocci.sh
+++ b/devtools/cocci.sh
@@ -44,7 +44,7 @@ PATCH_LIST="$@"
exit 1
)
-tmp=$(mktemp)
+tmp=$(mktemp -t dpdk.cocci.XXX)
for c in $PATCH_LIST; do
while true; do