]> www.infradead.org Git - users/sagi/blktests.git/commit
nvme: fix _create_nvmet_port
authorOmar Sandoval <osandov@fb.com>
Wed, 25 Apr 2018 22:15:43 +0000 (15:15 -0700)
committerOmar Sandoval <osandov@fb.com>
Wed, 25 Apr 2018 22:15:43 +0000 (15:15 -0700)
commitc03c788e6788d38e198e1231b24c99e94a0a0b52
tree318914dfbc08f31bc06f49a63ae6bdf07cc44c75
parent54a8509712c524ea46125e64af6af48f3a04d599
nvme: fix _create_nvmet_port

First of all, we get a shellcheck warning:

common/nvme:32:18: note: Use find instead of ls to better handle
non-alphanumeric filenames. [SC2012]

Secondly, it's not _technically_ correct to just count the number of
ports, since there could be just one port numbered 1. Instead, find the
first free port.

Signed-off-by: Omar Sandoval <osandov@fb.com>
common/nvme