scripts/setup: Return all block devices attached to a given controller
Each nvme BDF can have multiple namespaces, hence multiple block devices, return them all. Change-Id: I93fe8acf5b1904f05514445eb3e970ef4254caed Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5170 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
This commit is contained in:
parent
06058e9bdb
commit
eb32e8b2f1
@ -175,7 +175,6 @@ function get_block_dev_from_bdf() {
|
||||
for block in /sys/block/*; do
|
||||
if [[ $(readlink -f "$block/device") == *"/$bdf/"* ]]; then
|
||||
echo "${block##*/}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user