Группа :: Development/Tools
Пакет: spdk
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: spdk-21.10-alt-scripts-syntax.patch
Скачать
Скачать
From 3d0ad92729d87e9e4753d09324f798b5ce8e1752 Mon Sep 17 00:00:00 2001
From: Leontiy Volodin <lvol@altlinux.org>
Date: Fri, 10 Mar 2023 14:30:56 +0300
Subject: [PATCH] Fix syntax errors
---
scripts/env_dpdk/check_dpdk_pci_api.sh | 4 ++--
scripts/rxe_cfg_small.sh | 2 +-
scripts/setup.sh | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/env_dpdk/check_dpdk_pci_api.sh b/scripts/env_dpdk/check_dpdk_pci_api.sh
index a577371..7e0f082 100755
--- a/scripts/env_dpdk/check_dpdk_pci_api.sh
+++ b/scripts/env_dpdk/check_dpdk_pci_api.sh
@@ -18,7 +18,7 @@ dpdk_dir=${2:-"$rootdir/dpdk"}
dpdk_ver=$(< "$dpdk_dir/VERSION")
env_path="$rootdir/lib/env_dpdk"
-tracked_versions=("$env_path/"+([0-9]).+([0-9])/*.h)
+tracked_versions=(""$env_path/"+([0-9]).+([0-9])/*.h")
tracked_versions=("${tracked_versions[@]#"$env_path/"}")
tracked_versions=("${tracked_versions[@]%/*}")
@@ -30,7 +30,7 @@ done < <(printf "%s\n" "${tracked_versions[@]}" | sort -Vru)
echo "Checking DPDK PCI API from $dpdk_ver against $target_ver ..."
-target_headers=("$env_path/$target_ver/"*.h)
+target_headers=(""$env_path/$target_ver/"*.h")
target_headers=("${target_headers[@]##*/}")
# The includes should point to headers in SPDK tree rather than system ones.
diff --git a/scripts/rxe_cfg_small.sh b/scripts/rxe_cfg_small.sh
index 8d4d9f8..00e789e 100755
--- a/scripts/rxe_cfg_small.sh
+++ b/scripts/rxe_cfg_small.sh
@@ -262,7 +262,7 @@ link_up() {
collect_net_devices() {
local net_dev
- for net_dev in "$net/"!(bonding_masters); do
+ for net_dev in ""$net/"!(bonding_masters)"; do
(($(< "$net_dev/type") != 1)) && continue
net_devices["${net_dev##*/}"]=$net_dev
done
diff --git a/scripts/setup.sh b/scripts/setup.sh
index a15f2e3..45a8845 100755
--- a/scripts/setup.sh
+++ b/scripts/setup.sh
@@ -411,23 +411,23 @@ function cleanup_linux() {
local dirs_to_clean=() files_to_clean=() opened_files=() file_locks=()
local match_spdk="spdk_tgt|iscsi|vhost|nvmf|rocksdb|bdevio|bdevperf|vhost_fuzz|nvme_fuzz|accel_perf|bdev_svc"
- dirs_to_clean=({/var/run,/tmp}/dpdk/spdk{,_pid}+([0-9]))
+ dirs_to_clean=("{/var/run,/tmp}/dpdk/spdk{,_pid}+([0-9])")
if [[ -d $XDG_RUNTIME_DIR ]]; then
- dirs_to_clean+=("$XDG_RUNTIME_DIR/dpdk/spdk"{,_pid}+([0-9]))
+ dirs_to_clean+=(""$XDG_RUNTIME_DIR/dpdk/spdk"{,_pid}+([0-9])")
fi
for dir in "${dirs_to_clean[@]}"; do
files_to_clean+=("$dir/"*)
done
file_locks+=(/var/tmp/spdk_pci_lock*)
file_locks+=(/var/tmp/spdk_cpu_lock*)
- files_to_clean+=(/dev/shm/@(@($match_spdk)_trace|spdk_iscsi_conns)*)
+ files_to_clean+=("/dev/shm/@(@($match_spdk)_trace|spdk_iscsi_conns)*")
files_to_clean+=("${file_locks[@]}")
# This may fail in case path that readlink attempts to resolve suddenly
# disappears (as it may happen with terminating processes).
- opened_files+=($(readlink -f /proc/+([0-9])/fd/+([0-9]))) || true
+ opened_files+=("$(readlink -f /proc/+([0-9])/fd/+([0-9]))") || true
if ((${#opened_files[@]} == 0)); then
echo "Can't get list of opened files!"
--
libgit2 1.3.2