Disable MountPointDialog for swap, lvm pv and unknown partitions.
This commit is contained in:
parent
3d57b3211a
commit
0c70c66aae
|
@ -21,6 +21,7 @@
|
|||
#include "util/externalcommand.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <QDebug>
|
||||
|
||||
namespace FS
|
||||
{
|
||||
|
@ -134,9 +135,9 @@ QString linuxswap::unmountTitle() const
|
|||
|
||||
bool linuxswap::canMount(const QString& deviceNode, const QString& mountPoint) const {
|
||||
Q_UNUSED(deviceNode);
|
||||
Q_UNUSED(mountPoint);
|
||||
// linux swap doesn't require mount point to activate
|
||||
return true;
|
||||
qDebug() << mountPoint;
|
||||
return mountPoint != QStringLiteral("/");
|
||||
}
|
||||
|
||||
bool linuxswap::mount(Report& report, const QString& deviceNode, const QString& mountPoint)
|
||||
|
|
|
@ -110,4 +110,11 @@ bool lvm2_pv::updateUUID(Report& report, const QString& deviceNode) const
|
|||
ExternalCommand cmd(report, QStringLiteral("lvm"), { QStringLiteral("pvchange"), QStringLiteral("--uuid"), deviceNode });
|
||||
return cmd.run(-1) && cmd.exitCode() == 0;
|
||||
}
|
||||
|
||||
bool lvm2_pv::canMount(const QString & deviceNode, const QString & mountPoint) const
|
||||
{
|
||||
Q_UNUSED(deviceNode)
|
||||
Q_UNUSED(mountPoint)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ public:
|
|||
// bool resize(Report& report, const QString& deviceNode, qint64 length) const override;
|
||||
// bool writeLabel(Report& report, const QString& deviceNode, const QString& newLabel) override;
|
||||
bool updateUUID(Report& report, const QString& deviceNode) const override;
|
||||
bool canMount(const QString & deviceNode, const QString & mountPoint) const override;
|
||||
|
||||
CommandSupportType supportGetUsed() const override {
|
||||
return m_GetUsed;
|
||||
|
|
|
@ -23,4 +23,11 @@ unknown::unknown(qint64 firstsector, qint64 lastsector, qint64 sectorsused, cons
|
|||
FileSystem(firstsector, lastsector, sectorsused, label, FileSystem::Unknown)
|
||||
{
|
||||
}
|
||||
|
||||
bool unknown::canMount(const QString & deviceNode, const QString & mountPoint) const
|
||||
{
|
||||
Q_UNUSED(deviceNode)
|
||||
Q_UNUSED(mountPoint)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ public:
|
|||
bool supportToolFound() const override {
|
||||
return true;
|
||||
}
|
||||
bool canMount(const QString & deviceNode, const QString & mountPoint) const override;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue