[PATCH 1/9] nvme/rc: do not print error message when no nvme device is found
Hannes Reinecke
hare at suse.de
Sun Nov 21 23:55:16 PST 2021
_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>
---
tests/nvme/rc | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/nvme/rc b/tests/nvme/rc
index 1c27cde..086c094 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -306,6 +306,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