Remove unused includes.
This commit is contained in:
parent
69536b1129
commit
426a9385cd
|
@ -16,15 +16,16 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "core/lvmdevice.h"
|
#include "core/lvmdevice.h"
|
||||||
|
#include "core/partition.h"
|
||||||
#include "fs/filesystem.h"
|
#include "fs/filesystem.h"
|
||||||
#include "fs/lvm2_pv.h"
|
#include "fs/lvm2_pv.h"
|
||||||
#include "fs/luks.h"
|
#include "fs/luks.h"
|
||||||
#include "fs/filesystemfactory.h"
|
#include "fs/filesystemfactory.h"
|
||||||
#include "core/partition.h"
|
|
||||||
|
|
||||||
#include "core/partitiontable.h"
|
#include "core/partitiontable.h"
|
||||||
#include "util/externalcommand.h"
|
#include "util/externalcommand.h"
|
||||||
#include "util/helpers.h"
|
#include "util/helpers.h"
|
||||||
|
#include "util/report.h"
|
||||||
|
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,7 @@
|
||||||
#define LVMDEVICE__H
|
#define LVMDEVICE__H
|
||||||
|
|
||||||
#include "core/volumemanagerdevice.h"
|
#include "core/volumemanagerdevice.h"
|
||||||
|
|
||||||
#include "util/libpartitionmanagerexport.h"
|
#include "util/libpartitionmanagerexport.h"
|
||||||
#include "util/report.h"
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
@ -30,7 +28,8 @@
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
class PartitionTable;
|
class PartitionTable;
|
||||||
class CreatePartitionTableOperation;
|
class Report;
|
||||||
|
class Partition;
|
||||||
class SmartStatus;
|
class SmartStatus;
|
||||||
|
|
||||||
/** Represents LVM Volume Group.
|
/** Represents LVM Volume Group.
|
||||||
|
@ -56,6 +55,10 @@ public:
|
||||||
static QStringList s_DirtyPVs;
|
static QStringList s_DirtyPVs;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
static QList<LvmDevice*> scanSystemLVM();
|
static QList<LvmDevice*> scanSystemLVM();
|
||||||
|
|
||||||
static const QStringList getVGs();
|
static const QStringList getVGs();
|
||||||
|
@ -88,10 +91,18 @@ public:
|
||||||
static bool activateVG(Report& report, const LvmDevice& dev);
|
static bool activateVG(Report& report, const LvmDevice& dev);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initPartitions() override;
|
|
||||||
const QList<Partition*> scanPartitions(PartitionTable* pTable) const;
|
|
||||||
Partition* scanPartition(const QString& lvPath, PartitionTable* pTable) const;
|
|
||||||
|
|
||||||
|
void initPartitions() override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const QList<Partition*> scanPartitions(PartitionTable* pTable) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Partition* scanPartition(const QString& lvPath, PartitionTable* pTable) const;
|
||||||
qint64 mappedSector(const QString& lvpath, qint64 sector) const override;
|
qint64 mappedSector(const QString& lvpath, qint64 sector) const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -17,11 +17,6 @@
|
||||||
|
|
||||||
#include "core/volumemanagerdevice.h"
|
#include "core/volumemanagerdevice.h"
|
||||||
|
|
||||||
#include "core/partitiontable.h"
|
|
||||||
#include "core/smartstatus.h"
|
|
||||||
|
|
||||||
#include "util/capacity.h"
|
|
||||||
|
|
||||||
/** Constructs a Volume Manager Device with an empty PartitionTable.
|
/** Constructs a Volume Manager Device with an empty PartitionTable.
|
||||||
*/
|
*/
|
||||||
VolumeManagerDevice::VolumeManagerDevice(const QString& name,
|
VolumeManagerDevice::VolumeManagerDevice(const QString& name,
|
||||||
|
|
|
@ -27,12 +27,6 @@
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
class PartitionTable;
|
|
||||||
class CreatePartitionTableOperation;
|
|
||||||
class CoreBackend;
|
|
||||||
class SmartStatus;
|
|
||||||
class Partition;
|
|
||||||
|
|
||||||
/** A Volume Manager of real physical devices represented as an abstract device.
|
/** A Volume Manager of real physical devices represented as an abstract device.
|
||||||
|
|
||||||
VolumeManagerDevice is an abstract class of volume manager. e.g: LVM, SoftRAID.
|
VolumeManagerDevice is an abstract class of volume manager. e.g: LVM, SoftRAID.
|
||||||
|
@ -47,23 +41,34 @@ class LIBKPMCORE_EXPORT VolumeManagerDevice : public Device
|
||||||
Q_DISABLE_COPY(VolumeManagerDevice)
|
Q_DISABLE_COPY(VolumeManagerDevice)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
VolumeManagerDevice(const QString& name, const QString& devicenode, const qint32 logicalSize, const qint64 totalLogical, const QString& iconname = QString(), Device::Type type = Device::Unknown_Device);
|
VolumeManagerDevice(const QString& name, const QString& devicenode, const qint32 logicalSize, const qint64 totalLogical, const QString& iconname = QString(), Device::Type type = Device::Unknown_Device);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return list of physical device or partitions that makes up volumeManagerDevice.
|
||||||
|
*/
|
||||||
|
virtual const QStringList deviceNodes() const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
virtual const QStringList deviceNodes() const = 0; /** Return list of physical device or partitions that makes up volumeManagerDevice. */
|
|
||||||
virtual const QStringList partitionNodes() const = 0; /** Return list of partitions on the device. */
|
virtual const QStringList partitionNodes() const = 0; /** Return list of partitions on the device. */
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
virtual qint64 partitionSize(QString& partitionPath) const = 0; /** Return size of provided partition in bytes. */
|
virtual qint64 partitionSize(QString& partitionPath) const = 0; /** Return size of provided partition in bytes. */
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
virtual void initPartitions() = 0;
|
virtual void initPartitions() = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -73,17 +78,18 @@ public:
|
||||||
|
|
||||||
/** string deviceNodes together into comma-sperated list
|
/** string deviceNodes together into comma-sperated list
|
||||||
*
|
*
|
||||||
* */
|
* @return comma-seperated list of deviceNodes
|
||||||
|
*/
|
||||||
virtual QString prettyDeviceNodeList() const;
|
virtual QString prettyDeviceNodeList() const;
|
||||||
|
|
||||||
/**
|
/** Resize device total number of logical sectors.
|
||||||
*
|
*
|
||||||
|
* @param n Number of sectors.
|
||||||
*/
|
*/
|
||||||
void setTotalLogical(qint64 num) {
|
void setTotalLogical(qint64 n) {
|
||||||
Q_ASSERT(num > 0);
|
Q_ASSERT(n > 0);
|
||||||
m_TotalLogical = num;
|
m_TotalLogical = n;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue