devtools: use a common prefix for temporary files
PATCH 1/1 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.
--- buildtools/auto-config-h.sh | 2 +- devtools/check-includes.sh | 4 ++-- devtools/check-symbol-change.sh | 2 +- devtools/checkpatches.sh | 4 ++-- devtools/cocci.sh | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-)
buildtools/auto-config-h.sh +1 -1
@@ -23,7 +23,7 @@ name=${5:?define/type/function name required} : ${CC:=cc} -temp=/tmp/${0##*/}.$$.c +temp=$(mktemp -t dpdk.${0##*/}.XXX.c) case $type in define)
devtools/check-includes.sh +2 -2
@@ -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
devtools/check-symbol-change.sh +1 -1
@@ -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
devtools/checkpatches.sh +2 -2
@@ -157,11 +157,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
devtools/cocci.sh +1 -1
@@ -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
Signature · 1 line
2.19.0
Quoted 11 lines · Thomas Monjalon
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 <[email protected]>---
Thomas Monjalon
Applied20/09/2018 13:22, Bruce Richardson:
Quoted 7 lines · Thomas Monjalon
Quoted 6 lines
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.
Quoted 7 lines
Quoted 5 lines
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 <[email protected]>---
Acked-by Bruce Richardson <[email protected]>
Applied