[partition] Only bootloader model should ignore devices that are not of Disk_Device type.
This commit is contained in:
parent
77d2667b53
commit
f72f7bd8fe
@ -129,12 +129,7 @@ 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)->type() != Device::Type::Disk_Device )
|
if ( ! ( *it ) ||
|
||||||
{
|
|
||||||
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" )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -164,7 +164,18 @@ PartitionCoreModule::doInit()
|
|||||||
for ( auto deviceInfo : m_deviceInfos )
|
for ( auto deviceInfo : m_deviceInfos )
|
||||||
deviceInfo->partitionModel->init( deviceInfo->device.data(), m_osproberLines );
|
deviceInfo->partitionModel->init( deviceInfo->device.data(), m_osproberLines );
|
||||||
|
|
||||||
m_bootLoaderModel->init( devices );
|
DeviceList bootLoaderDevices;
|
||||||
|
|
||||||
|
for ( DeviceList::Iterator it = devices.begin(); it != devices.end(); ++it)
|
||||||
|
if ( (*it)->type() != Device::Type::Disk_Device )
|
||||||
|
{
|
||||||
|
cDebug() << "Ignoring device that is not Disk_Device to bootLoaderDevices list.";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
bootLoaderDevices.append(*it);
|
||||||
|
|
||||||
|
m_bootLoaderModel->init( bootLoaderDevices );
|
||||||
|
|
||||||
//FIXME: this should be removed in favor of
|
//FIXME: this should be removed in favor of
|
||||||
// proper KPM support for EFI
|
// proper KPM support for EFI
|
||||||
|
Loading…
Reference in New Issue
Block a user