mirror of
https://github.com/martijnvanbrummelen/nwipe.git
synced 2026-02-20 13:42:14 +00:00
modified disk sorting for more than 26 disks
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user