[PATCH 01/10] nvme/rc: do not print error message when no nvme device is found

Hannes Reinecke
2022-06-10T11:34:14Z

_find_nvme_dev() will only print an nvme device node if one is found,
so no point in printing an error message.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
---
tests/nvme/rc | 1 +
1 file changed, 1 insertion(+)

diff --git a/tests/nvme/rc b/tests/nvme/rc
index 998b181..ad4324f 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -308,6 +308,7 @@ _find_nvme_dev() {
local subsysnqn
local dev
for dev in /sys/class/nvme/nvme*; do
+ [ -e "$dev" ] || continue
dev="$(basename "$dev")"
subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn")"
if [[ "$subsysnqn" == "$subsys" ]]; then
--
2.26.2