[fsresizer] [partition] Drop special cases for kpmcore 3.3.1

This commit is contained in:
Adriaan de Groot 2019-06-13 14:10:49 +02:00
parent 9f0f08b571
commit 3930826e93
4 changed files with 4 additions and 9 deletions

View File

@ -61,7 +61,7 @@ ResizeFSJob::PartitionMatch
ResizeFSJob::findPartition( CoreBackend* backend ) ResizeFSJob::findPartition( CoreBackend* backend )
{ {
using DeviceList = QList< Device* >; using DeviceList = QList< Device* >;
#ifdef WITH_KPMCORE331API #if defined( WITH_KPMCORE4API )
DeviceList devices = backend->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag(0) ); DeviceList devices = backend->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag(0) );
#else #else
DeviceList devices = backend->scanDevices( /* excludeReadOnly */ true ); DeviceList devices = backend->scanDevices( /* excludeReadOnly */ true );

View File

@ -109,7 +109,7 @@ QList< Device* > getDevices( DeviceType which, qint64 minimumSize )
bool writableOnly = (which == DeviceType::WritableOnly); bool writableOnly = (which == DeviceType::WritableOnly);
CoreBackend* backend = CoreBackendManager::self()->backend(); CoreBackend* backend = CoreBackendManager::self()->backend();
#ifdef WITH_KPMCORE331API #if defined( WITH_KPMCORE4API )
DeviceList devices = backend->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag(0) ); DeviceList devices = backend->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag(0) );
#else #else
DeviceList devices = backend->scanDevices( /* excludeReadOnly */ true ); DeviceList devices = backend->scanDevices( /* excludeReadOnly */ true );

View File

@ -34,7 +34,7 @@ class Partition;
class PartitionNode; class PartitionNode;
class PartitionRole; class PartitionRole;
#ifdef WITH_KPMCORE331API #if defined( WITH_KPMCORE4API )
#define KPM_PARTITION_FLAG(x) PartitionTable::Flag::x #define KPM_PARTITION_FLAG(x) PartitionTable::Flag::x
#define KPM_PARTITION_STATE(x) Partition::State::x #define KPM_PARTITION_STATE(x) Partition::State::x
#define KPM_PARTITION_FLAG_ESP PartitionTable::Flag::Boot #define KPM_PARTITION_FLAG_ESP PartitionTable::Flag::Boot

View File

@ -687,14 +687,9 @@ PartitionCoreModule::scanForLVMPVs()
#if defined( WITH_KPMCORE4API ) #if defined( WITH_KPMCORE4API )
VolumeManagerDevice::scanDevices( physicalDevices ); VolumeManagerDevice::scanDevices( physicalDevices );
for ( auto p : LVM::pvList::list() ) for ( auto p : LVM::pvList::list() )
#else
#if defined( WITH_KPMCORE331API )
LvmDevice::scanSystemLVM( physicalDevices );
for ( auto p : LVM::pvList::list() )
#else #else
LvmDevice::scanSystemLVM( physicalDevices ); LvmDevice::scanSystemLVM( physicalDevices );
for ( auto p : LVM::pvList ) for ( auto p : LVM::pvList )
#endif
#endif #endif
{ {
m_lvmPVs << p.partition().data(); m_lvmPVs << p.partition().data();
@ -728,7 +723,7 @@ PartitionCoreModule::scanForLVMPVs()
if ( innerFS && innerFS->type() == FileSystem::Type::Lvm2_PV ) if ( innerFS && innerFS->type() == FileSystem::Type::Lvm2_PV )
m_lvmPVs << p; m_lvmPVs << p;
} }
#ifdef WITH_KPMCORE4API #if defined( WITH_KPMCORE4API )
else if ( p->fileSystem().type() == FileSystem::Type::Luks2 ) else if ( p->fileSystem().type() == FileSystem::Type::Luks2 )
{ {
// Encrypted LVM PVs // Encrypted LVM PVs