scripts/gen_nvme.sh: remove unnecessary wrapper function
create_json_config_with_subsystems contents does not need to be in a function. Moving it to main simplifies --with-subsystems condition. Signed-off-by: Karol Latecki <karol.latecki@intel.com> Change-Id: I1414a209cc666ebb4639fc25133168482bd96c97 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8775 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>
This commit is contained in:
parent
65b3c34b14
commit
f60b99b168
@ -49,16 +49,6 @@ function create_json_config() {
|
||||
JSON
|
||||
}
|
||||
|
||||
function create_json_config_with_subsystems() {
|
||||
cat <<- JSON
|
||||
{
|
||||
"subsystems": [
|
||||
$(create_json_config)
|
||||
]
|
||||
}
|
||||
JSON
|
||||
}
|
||||
|
||||
while getopts 'h-:' optchar; do
|
||||
case "$optchar" in
|
||||
-)
|
||||
@ -73,8 +63,17 @@ while getopts 'h-:' optchar; do
|
||||
esac
|
||||
done
|
||||
|
||||
bdev_json_cfg=$(create_json_config)
|
||||
if [[ $gen_subsystems == true ]]; then
|
||||
create_json_config_with_subsystems
|
||||
else
|
||||
create_json_config
|
||||
bdev_json_cfg=$(
|
||||
cat <<- JSON
|
||||
{
|
||||
"subsystems": [
|
||||
$bdev_json_cfg
|
||||
]
|
||||
}
|
||||
JSON
|
||||
)
|
||||
fi
|
||||
|
||||
echo "$bdev_json_cfg"
|
||||
|
Loading…
Reference in New Issue
Block a user