]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
nvme: fix counting the target port
authorJohannes Thumshirn <jthumshirn@suse.de>
Thu, 3 May 2018 15:00:53 +0000 (17:00 +0200)
committerOmar Sandoval <osandov@fb.com>
Mon, 14 May 2018 19:56:22 +0000 (12:56 -0700)
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
common/nvme

index b1af5ad2cf26d0f9f16fd0899276e4057b0a2c8a..96cb465699d52074017eb94217a63f7bdf9c8feb 100644 (file)
@@ -27,11 +27,11 @@ _test_dev_is_nvme() {
 
 _create_nvmet_port() {
        local trtype="$1"
-       local nvmet_cfs="/sys/kernel/config/nvmet/"
+       local nvmet_cfs="/sys/kernel/config/nvmet"
 
        local port
        for ((port = 0; ; port++)); do
-               if [[ ! -e "${nvmet_cfs}/${port}" ]]; then
+               if [[ ! -e "${nvmet_cfs}/ports/${port}" ]]; then
                        break
                fi
        done