[partition] [fsresizer] Adjust to new #define
- Using KPMCORE4API is clearer than just relying on a version number
This commit is contained in:
parent
9159761171
commit
c0710cabe4
@ -120,7 +120,7 @@ ResizeFSJob::PartitionMatch
|
|||||||
ResizeFSJob::findPartition( CoreBackend* backend )
|
ResizeFSJob::findPartition( CoreBackend* backend )
|
||||||
{
|
{
|
||||||
using DeviceList = QList< Device* >;
|
using DeviceList = QList< Device* >;
|
||||||
#ifdef WITH_KPMCOREGT33
|
#ifdef 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 );
|
||||||
|
@ -107,7 +107,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_KPMCOREGT33
|
#ifdef 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 );
|
||||||
|
@ -33,7 +33,7 @@ class Partition;
|
|||||||
class PartitionNode;
|
class PartitionNode;
|
||||||
class PartitionRole;
|
class PartitionRole;
|
||||||
|
|
||||||
#ifdef WITH_KPMCOREGT33
|
#ifdef 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
|
||||||
|
@ -683,7 +683,7 @@ PartitionCoreModule::scanForLVMPVs()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_KPMCOREGT33
|
#ifdef WITH_KPMCORE4API
|
||||||
VolumeManagerDevice::scanDevices( physicalDevices );
|
VolumeManagerDevice::scanDevices( physicalDevices );
|
||||||
|
|
||||||
for ( auto p : LVM::pvList::list() )
|
for ( auto p : LVM::pvList::list() )
|
||||||
@ -724,7 +724,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_KPMCOREGT33
|
#ifdef WITH_KPMCORE4API
|
||||||
else if ( p->fileSystem().type() == FileSystem::Type::Luks2 )
|
else if ( p->fileSystem().type() == FileSystem::Type::Luks2 )
|
||||||
{
|
{
|
||||||
// Encrypted LVM PVs
|
// Encrypted LVM PVs
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
#include <kpmcore/core/device.h>
|
#include <kpmcore/core/device.h>
|
||||||
#include <kpmcore/core/partition.h>
|
#include <kpmcore/core/partition.h>
|
||||||
#ifdef WITH_KPMCOREGT33
|
#ifdef WITH_KPMCORE4API
|
||||||
#include <kpmcore/core/softwareraid.h>
|
#include <kpmcore/core/softwareraid.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1224,7 +1224,7 @@ ChoicePage::setupActions()
|
|||||||
bool atLeastOneIsMounted = false; // Suppress 'erase' if so
|
bool atLeastOneIsMounted = false; // Suppress 'erase' if so
|
||||||
bool isInactiveRAID = false;
|
bool isInactiveRAID = false;
|
||||||
|
|
||||||
#ifdef WITH_KPMCOREGT33
|
#ifdef WITH_KPMCORE4API
|
||||||
if ( currentDevice->type() == Device::Type::SoftwareRAID_Device &&
|
if ( currentDevice->type() == Device::Type::SoftwareRAID_Device &&
|
||||||
static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive )
|
static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive )
|
||||||
{
|
{
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
// KPMcore
|
// KPMcore
|
||||||
#include <kpmcore/core/device.h>
|
#include <kpmcore/core/device.h>
|
||||||
#include <kpmcore/core/partition.h>
|
#include <kpmcore/core/partition.h>
|
||||||
#ifdef WITH_KPMCOREGT33
|
#ifdef WITH_KPMCORE4API
|
||||||
#include <kpmcore/core/softwareraid.h>
|
#include <kpmcore/core/softwareraid.h>
|
||||||
#endif
|
#endif
|
||||||
#include <kpmcore/ops/deactivatevolumegroupoperation.h>
|
#include <kpmcore/ops/deactivatevolumegroupoperation.h>
|
||||||
@ -162,7 +162,7 @@ PartitionPage::updateButtons()
|
|||||||
{
|
{
|
||||||
createTable = true;
|
createTable = true;
|
||||||
|
|
||||||
#ifdef WITH_KPMCOREGT33
|
#ifdef WITH_KPMCORE4API
|
||||||
if ( device->type() == Device::Type::SoftwareRAID_Device &&
|
if ( device->type() == Device::Type::SoftwareRAID_Device &&
|
||||||
static_cast< SoftwareRAID* >(device)->status() == SoftwareRAID::Status::Inactive )
|
static_cast< SoftwareRAID* >(device)->status() == SoftwareRAID::Status::Inactive )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user