diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index 77333846a..87393a424 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -548,29 +548,14 @@ PartitionCoreModule::scanForEfiSystemPartitions() devices.append( device ); } - //FIXME: Unfortunately right now we have to call sgdisk manually because - // the KPM submodule does not expose the ESP flag from libparted. - // The following findPartitions call and lambda should be scrapped and - // rewritten based on libKPM. -- Teo 5/2015 QList< Partition* > efiSystemPartitions = KPMHelpers::findPartitions( devices, []( Partition* partition ) -> bool { - QProcess process; - process.setProgram( "sgdisk" ); - process.setArguments( { "-i", - QString::number( partition->number() ), - partition->devicePath() } ); - process.setProcessChannelMode( QProcess::MergedChannels ); - process.start(); - if ( process.waitForFinished() ) + if ( partition->activeFlags().testFlag( PartitionTable::FlagEsp ) ) { - if ( process.readAllStandardOutput() - .contains( "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" ) ) - { - cDebug() << "Found EFI system partition at" << partition->partitionPath(); - return true; - } + cDebug() << "Found EFI system partition at" << partition->partitionPath(); + return true; } return false; } );