[partition] In logging, distinguish more cases
- While winnowing devices, the zram and nullptr cases were mixed together; split them, for the sake of logging more accurately. - While here, fix up some coding-style issues.
This commit is contained in:
parent
d507425128
commit
800f9d34f9
@ -113,28 +113,32 @@ QList< Device* > getDevices( DeviceType which, qint64 minimumSize )
|
||||
|
||||
// Remove the device which contains / from the list
|
||||
for ( DeviceList::iterator it = devices.begin(); it != devices.end(); )
|
||||
if ( ! ( *it ) ||
|
||||
( *it )->deviceNode().startsWith( "/dev/zram" )
|
||||
if ( !( *it ) )
|
||||
{
|
||||
cDebug() << " .. Skipping nullptr device";
|
||||
it = erase( devices, it);
|
||||
}
|
||||
else if ( ( *it )->deviceNode().startsWith( "/dev/zram" )
|
||||
)
|
||||
{
|
||||
cDebug() << " .. Removing zram" << it;
|
||||
it = erase(devices, it );
|
||||
it = erase( devices, it );
|
||||
|
||||
}
|
||||
else if ( writableOnly && hasRootPartition( *it ) )
|
||||
{
|
||||
cDebug() << " .. Removing device with root filesystem (/) on it" << it;
|
||||
it = erase(devices, it );
|
||||
it = erase( devices, it );
|
||||
}
|
||||
else if ( writableOnly && isIso9660( *it ) )
|
||||
{
|
||||
cDebug() << " .. Removing device with iso9660 filesystem (probably a CD) on it" << it;
|
||||
it = erase(devices, it );
|
||||
it = erase( devices, it );
|
||||
}
|
||||
else if ( (minimumSize >= 0) && !( (*it)->capacity() > minimumSize ) )
|
||||
{
|
||||
cDebug() << " .. Removing too-small" << it;
|
||||
it = erase(devices, it );
|
||||
it = erase( devices, it );
|
||||
}
|
||||
else
|
||||
++it;
|
||||
|
Loading…
Reference in New Issue
Block a user