void zfs::init()
{
m_SetLabel = findExternal("zpool", QStringList(), 2) ? cmdSupportFileSystem : cmdSupportNone;
+ m_Check = m_SetLabel;
m_GetUsed = findExternal("zfs", QStringList(), 2) ? cmdSupportFileSystem : cmdSupportNone;
+
m_GetLabel = cmdSupportCore;
m_Backup = cmdSupportCore;
m_GetUUID = cmdSupportCore;
m_GetLabel != cmdSupportNone &&
m_SetLabel != cmdSupportNone &&
// m_Create != cmdSupportNone &&
-// m_Check != cmdSupportNone &&
+ m_Check != cmdSupportNone &&
// m_UpdateUUID != cmdSupportNone &&
// m_Grow != cmdSupportNone &&
// m_Shrink != cmdSupportNone &&
return result;
}
+ bool zfs::check(Report& report, const QString& deviceNode) const
+ {
+ Q_UNUSED(deviceNode)
+ ExternalCommand cmd(report, "zpool", QStringList() << "scrub" << "-w" << this->label());
+ return cmd.run(-1) && (cmd.exitCode() == 0);
+ }
+
bool zfs::remove(Report& report, const QString& deviceNode) const
{
Q_UNUSED(deviceNode)
static void init();
virtual qint64 readUsedCapacity(const QString& deviceNode) const;
+ virtual bool check(Report& report, const QString& deviceNode) const;
virtual bool remove(Report& report, const QString& deviceNode) const;
virtual bool writeLabel(Report& report, const QString& deviceNode, const QString& newLabel);