scripts/gen_nvme.sh: make bdfs var local to a function
No need to keep "bdfs" variable as global variable. Signed-off-by: Karol Latecki <karol.latecki@intel.com> Change-Id: I655ed9f1514f13a6460292c1298ef08f904157fa Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8774 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
This commit is contained in:
parent
61f3c72cd2
commit
65b3c34b14
@ -19,6 +19,9 @@ function usage() {
|
||||
|
||||
function create_json_config() {
|
||||
local bdev_json_cfg=()
|
||||
local bdfs=()
|
||||
|
||||
bdfs=($(nvme_in_userspace))
|
||||
|
||||
for i in "${!bdfs[@]}"; do
|
||||
bdev_json_cfg+=("$(
|
||||
@ -70,8 +73,6 @@ while getopts 'h-:' optchar; do
|
||||
esac
|
||||
done
|
||||
|
||||
bdfs=($(nvme_in_userspace))
|
||||
|
||||
if [[ $gen_subsystems == true ]]; then
|
||||
create_json_config_with_subsystems
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user