[PATCH blktests 1/3] nvme: fix counting available ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Johannes Thumshirn <jthumshirn@xxxxxxx>
---
 common/nvme | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/nvme b/common/nvme
index 400f66690f52..506612f27297 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"
-- 
2.16.3




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux