Skip to content

Commit

Permalink
common: fix ndctl & jq detection for testconfig generation
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Michalski <jan.michalski@intel.com>
  • Loading branch information
janekmi committed Jul 19, 2023
1 parent 26e41f8 commit 3a81a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/create-testconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TM=1
# lookup all Device DAX devices in the system
DEVICE_DAX_PATH=
device_dax_path=
if [ `which ndctl` -a `which jq` ]; then
if which ndctl > /dev/null 2>&1 && which jq > /dev/null 2>&1; then
DEVICE_DAX_PATH="$(ndctl list -X | jq -r '.[].daxregion.devices[].chardev' | awk '$0="/dev/"$0' | paste -sd' ')"
device_dax_path="$(ndctl list -X | jq -r '.[].daxregion.devices[].chardev' | awk '$0="'\''/dev/"$0"'\''"' | paste -sd',')"
fi
Expand Down

0 comments on commit 3a81a3d

Please sign in to comment.