modified disk sorting for more than 26 disks

This commit is contained in:
Gerold Gruber
2023-11-05 02:02:39 +01:00
parent d14c3da26b
commit 470672bc3a

View File

@@ -70,6 +70,11 @@ int devnamecmp( const void* a, const void* b )
// nwipe_log( NWIPE_LOG_DEBUG, "a: %s, b: %s", ( *( nwipe_context_t** ) a)->device_name, ( *( nwipe_context_t** )
// b)->device_name );
int ldiff = strlen( ( *(nwipe_context_t**) a )->device_name ) - strlen( ( *(nwipe_context_t**) b )->device_name );
if( ldiff != 0 )
{
return ldiff;
}
int ret = strcmp( ( *(nwipe_context_t**) a )->device_name, ( *(nwipe_context_t**) b )->device_name );
return ( ret );
}