[LTP] [PATCH v3 4/4] tst_find_backing_dev: Also check /dev/block/ for backing device

Petr Vorel pvorel@suse.cz
Mon Mar 27 11:36:51 CEST 2023


Hi Edward,

Reviewed-by: Petr Vorel <pvorel@suse.cz>

...
> -		if (dev_name[0])
> -			sprintf(dev, "/dev/%s", dev_name);
> +		if (!dev_name[0] || set_dev_path(dev_name, dev, dev_len) != 0)
> +			tst_brkm(TBROK, NULL, "Could not stat backing device %s", dev);
nit: I'd use !set_dev_path()
if (!dev_name[0] || set_dev_path(dev_name, dev, dev_len))
(can be changed be before merge).

Kind regards,
Petr

> +
>  	} else {
>  		tst_brkm(TBROK, NULL, "uevent file (%s) access failed", uevent_path);
>  	}


More information about the ltp mailing list