Fix --nousb missing a drive

If a USB device generated a particular error
code from smartmontools, the --nousb option
incorrectly did not exclude it from the
enumerated drives.

This has now been corrected.
This commit is contained in:
PartialVolume
2020-04-01 21:29:08 +01:00
parent 57eeab2292
commit 0488138c43

View File

@@ -159,7 +159,8 @@ int check_device( nwipe_context_t*** c, PedDevice* dev, int dcount )
/* retrieve bus and drive serial number, HOWEVER we are only interested in the bus at this time */
r = nwipe_get_device_bus_type_and_serialno( dev->path, &bus, tmp_serial );
if( r == 0 || r == 5 )
/* See nwipe_get_device_bus_type_and_serialno() function for meaning of these codes */
if( r == 0 || ( r >= 3 && r <= 6 ) )
{
if( bus == NWIPE_DEVICE_USB )
{