Add createWithLabel support for F2FS.
This commit is contained in:
parent
6a78a74515
commit
fd68f9334c
|
@ -119,4 +119,10 @@ bool f2fs::create(Report& report, const QString& deviceNode)
|
||||||
return cmd.run(-1) && cmd.exitCode() == 0;
|
return cmd.run(-1) && cmd.exitCode() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool f2fs::createWithLabel(Report& report, const QString& deviceNode, const QString& label)
|
||||||
|
{
|
||||||
|
ExternalCommand cmd(report, QStringLiteral("mkfs.f2fs"), { QStringLiteral("-l"), label, deviceNode });
|
||||||
|
return cmd.run(-1) && cmd.exitCode() == 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ public:
|
||||||
// qint64 readUsedCapacity(const QString& deviceNode) const override;
|
// qint64 readUsedCapacity(const QString& deviceNode) const override;
|
||||||
bool check(Report& report, const QString& deviceNode) const override;
|
bool check(Report& report, const QString& deviceNode) const override;
|
||||||
bool create(Report& report, const QString& deviceNode) override;
|
bool create(Report& report, const QString& deviceNode) override;
|
||||||
|
bool createWithLabel(Report& report, const QString& deviceNode, const QString& label) override;
|
||||||
// qint64 readUsedCapacity(const QString& deviceNode) const override;
|
// qint64 readUsedCapacity(const QString& deviceNode) const override;
|
||||||
// bool resize(Report& report, const QString& deviceNode, qint64 length) const override;
|
// bool resize(Report& report, const QString& deviceNode, qint64 length) const override;
|
||||||
// bool writeLabel(Report& report, const QString& deviceNode, const QString& newLabel) override;
|
// bool writeLabel(Report& report, const QString& deviceNode, const QString& newLabel) override;
|
||||||
|
@ -59,6 +60,9 @@ public:
|
||||||
CommandSupportType supportCreate() const override {
|
CommandSupportType supportCreate() const override {
|
||||||
return m_Create;
|
return m_Create;
|
||||||
}
|
}
|
||||||
|
CommandSupportType supportCreateWithLabel() const override {
|
||||||
|
return m_Create;
|
||||||
|
}
|
||||||
CommandSupportType supportGrow() const override {
|
CommandSupportType supportGrow() const override {
|
||||||
return m_Grow;
|
return m_Grow;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue