From 59bdd911f3cac53b5d32e2f5ece63348b895e11a Mon Sep 17 00:00:00 2001 From: Ric Li Date: Mon, 13 Nov 2023 15:54:04 +0800 Subject: [PATCH] fix Signed-off-by: Ric Li --- script/nicctl.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/nicctl.sh b/script/nicctl.sh index 0ebbe17b5..08b71d8d2 100755 --- a/script/nicctl.sh +++ b/script/nicctl.sh @@ -117,13 +117,13 @@ list() { id_counter=0 - for pci_bdf in $(dpdk-devbind.py -s | awk '/Network devices using (DPDK-compatible|kernel) driver/ {show=1; next} /^$/ {show=0} show && /drv=/ {print $1}'); do + for pci_bdf in $(dpdk-devbind.py -s | awk '/^Network devices/ {show=1; next} /^$/ {show=0} show && /drv=/ {print $1}'); do - driver=$(basename $(readlink /sys/bus/pci/devices/"${pci_bdf}"/driver) 2>/dev/null || echo "N/A") + driver=$(basename "$(readlink /sys/bus/pci/devices/"${pci_bdf}"/driver)" 2>/dev/null || echo "N/A") numa_node=$(cat /sys/bus/pci/devices/"${pci_bdf}"/numa_node 2>/dev/null || echo "N/A") - iommu_group=$(basename $(readlink /sys/bus/pci/devices/"${pci_bdf}"/iommu_group) 2>/dev/null || echo "N/A") + iommu_group=$(basename "$(readlink /sys/bus/pci/devices/"${pci_bdf}"/iommu_group)" 2>/dev/null || echo "N/A") interface_name=$(basename /sys/bus/pci/devices/"${pci_bdf}"/net/*)