excludeReadOnly->excludeLoop.
This commit is contained in:
parent
4a0b8f8efb
commit
b5d1529370
|
@ -90,7 +90,7 @@ public:
|
||||||
* @return a QList of pointers to Device instances. The caller is responsible
|
* @return a QList of pointers to Device instances. The caller is responsible
|
||||||
* for deleting these objects.
|
* for deleting these objects.
|
||||||
*/
|
*/
|
||||||
virtual QList<Device*> scanDevices(bool excludeReadOnly = false) = 0;
|
virtual QList<Device*> scanDevices(bool excludeLoop = false) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scan a single device in the system.
|
* Scan a single device in the system.
|
||||||
|
|
|
@ -46,9 +46,9 @@ void DummyBackend::initFSSupport()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<Device*> DummyBackend::scanDevices(bool excludeReadOnly)
|
QList<Device*> DummyBackend::scanDevices(bool excludeLoop)
|
||||||
{
|
{
|
||||||
Q_UNUSED(excludeReadOnly)
|
Q_UNUSED(excludeLoop)
|
||||||
QList<Device*> result;
|
QList<Device*> result;
|
||||||
result.append(scanDevice(QStringLiteral("/dev/sda")));
|
result.append(scanDevice(QStringLiteral("/dev/sda")));
|
||||||
|
|
||||||
|
|
|
@ -308,7 +308,7 @@ Device* LibPartedBackend::scanDevice(const QString& deviceNode)
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<Device*> LibPartedBackend::scanDevices(bool excludeReadOnly)
|
QList<Device*> LibPartedBackend::scanDevices(bool excludeLoop)
|
||||||
{
|
{
|
||||||
QList<Device*> result;
|
QList<Device*> result;
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ QList<Device*> LibPartedBackend::scanDevices(bool excludeReadOnly)
|
||||||
QStringLiteral("--noheadings"),
|
QStringLiteral("--noheadings"),
|
||||||
QStringLiteral("--output"), QString::fromLatin1("name"),
|
QStringLiteral("--output"), QString::fromLatin1("name"),
|
||||||
QStringLiteral("--paths"),
|
QStringLiteral("--paths"),
|
||||||
QStringLiteral("--include"), excludeReadOnly ? QStringLiteral("3,8") : QStringLiteral("3,7,8") });
|
QStringLiteral("--include"), excludeLoop ? QStringLiteral("3,8") : QStringLiteral("3,7,8") });
|
||||||
if (cmd.run(-1) && cmd.exitCode() == 0) {
|
if (cmd.run(-1) && cmd.exitCode() == 0) {
|
||||||
QStringList devices = cmd.output().split(QString::fromLatin1("\n"));
|
QStringList devices = cmd.output().split(QString::fromLatin1("\n"));
|
||||||
devices.removeLast();
|
devices.removeLast();
|
||||||
|
|
|
@ -65,7 +65,7 @@ public:
|
||||||
CoreBackendDevice* openDeviceExclusive(const QString& deviceNode) override;
|
CoreBackendDevice* openDeviceExclusive(const QString& deviceNode) override;
|
||||||
bool closeDevice(CoreBackendDevice* core_device) override;
|
bool closeDevice(CoreBackendDevice* core_device) override;
|
||||||
Device* scanDevice(const QString& deviceNode) override;
|
Device* scanDevice(const QString& deviceNode) override;
|
||||||
QList<Device*> scanDevices(bool excludeReadOnly = false) override;
|
QList<Device*> scanDevices(bool excludeLoop = false) override;
|
||||||
FileSystem::Type detectFileSystem(const QString& partitionPath) override;
|
FileSystem::Type detectFileSystem(const QString& partitionPath) override;
|
||||||
|
|
||||||
static QString lastPartedExceptionMessage();
|
static QString lastPartedExceptionMessage();
|
||||||
|
|
Loading…
Reference in New Issue