[partition] Changing PartUtils::getDevices to ignore devices that aren't of Disk_Device type.
This commit is contained in:
parent
4121a108ab
commit
a48b1eacdd
@ -129,7 +129,12 @@ QList< Device* > getDevices( DeviceType which, qint64 minimumSize )
|
|||||||
|
|
||||||
// Remove the device which contains / from the list
|
// Remove the device which contains / from the list
|
||||||
for ( DeviceList::iterator it = devices.begin(); it != devices.end(); )
|
for ( DeviceList::iterator it = devices.begin(); it != devices.end(); )
|
||||||
if ( ! ( *it ) ||
|
if ( (*it)->type() != Device::Type::Disk_Device )
|
||||||
|
{
|
||||||
|
cDebug() << " .. Removing device that is not a Disk_Device from list " << it;
|
||||||
|
it = erase(devices, it );
|
||||||
|
}
|
||||||
|
else if ( ! ( *it ) ||
|
||||||
( *it )->deviceNode().startsWith( "/dev/zram" )
|
( *it )->deviceNode().startsWith( "/dev/zram" )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -152,11 +157,6 @@ QList< Device* > getDevices( DeviceType which, qint64 minimumSize )
|
|||||||
cDebug() << " .. Removing too-small" << it;
|
cDebug() << " .. Removing too-small" << it;
|
||||||
it = erase(devices, it );
|
it = erase(devices, it );
|
||||||
}
|
}
|
||||||
else if ( (*it)->type() == Device::LVM_Device )
|
|
||||||
{
|
|
||||||
cDebug() << " .. Removing LVM device from list " << it;
|
|
||||||
it = erase(devices, it );
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
++it;
|
++it;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user