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

Hannes Reinecke hare at suse.de
Fri Jun 10 04:33:15 PDT 2022


_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 at suse.de>
Reviewed-by: Sagi Grimberg <sagi at 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




More information about the Linux-nvme mailing list