Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Commit

Permalink
[partition] Only bootloader model should ignore devices that are not …
Browse files Browse the repository at this point in the history
…of Disk_Device type calamares#950
  • Loading branch information
philmmanjaro committed May 12, 2018
1 parent 96e04b1 commit 6f4dff7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/modules/partition/core/DeviceList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,7 @@ 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)->type() != Device::Type::Disk_Device )
{
cDebug() << " .. Removing device that is not a Disk_Device from list " << it;
it = erase(devices, it );
}
else if ( ! ( *it ) ||
if ( ! ( *it ) ||
( *it )->deviceNode().startsWith( "/dev/zram" )
)
{
Expand Down
13 changes: 12 additions & 1 deletion src/modules/partition/core/PartitionCoreModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,18 @@ PartitionCoreModule::doInit()
for ( auto deviceInfo : m_deviceInfos )
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
// proper KPM support for EFI
Expand Down

0 comments on commit 6f4dff7

Please sign in to comment.