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

Sagi Grimberg sagi at grimberg.me
Mon Nov 22 00:49:27 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
> 

OK,

Reviewed-by: Sagi Grimberg <sagi at grimberg.me>



More information about the Linux-nvme mailing list