From: Johannes Thumshirn Date: Tue, 24 Apr 2018 16:12:49 +0000 (-0600) Subject: nvme: fix counting available ports X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=804e0a12a80ec393d1f8b9f49b193e94bba3fb29;p=users%2Fsagi%2Fblktests.git nvme: fix counting available ports Signed-off-by: Johannes Thumshirn --- diff --git a/common/nvme b/common/nvme index 400f666..506612f 100644 --- a/common/nvme +++ b/common/nvme @@ -29,7 +29,7 @@ _create_nvmet_port() { local trtype="$1" local nvmet_cfs="/sys/kernel/config/nvmet/" - local port=$(($(ls "${nvmet_cfs}" | wc -l) + 1)) + local port=$(($(ls "${nvmet_cfs}/ports" | wc -l) + 1)) mkdir "${nvmet_cfs}/ports/${port}" echo "${trtype}" > "${nvmet_cfs}/ports/${port}/addr_trtype"