Read all information about devices in smartctl (not only SMART).

This commit is contained in:
Johnny Silverman
2025-11-08 16:11:57 +02:00
parent 35d7ed9c8a
commit 81ac60768f

View File

@@ -99,7 +99,7 @@ QPair<QStringList, QJsonArray> utils::scanDevices(bool initializing)
for (const QJsonValue &value : std::as_const(devices)) { for (const QJsonValue &value : std::as_const(devices)) {
QJsonObject device = value.toObject(); QJsonObject device = value.toObject();
QString deviceName = device["name"].toString(); QString deviceName = device["name"].toString();
commandList.append((smartctlPath + " --all --json=o %1").arg(deviceName)); commandList.append((smartctlPath + " -x --json=o %1").arg(deviceName));
} }
QString command = commandList.join(" ; "); QString command = commandList.join(" ; ");
@@ -139,7 +139,7 @@ QString utils::initiateSelfTest(const QString &testType, const QString &deviceNo
QProcess process; QProcess process;
QString command = getSmartctlPath(); QString command = getSmartctlPath();
QStringList arguments; QStringList arguments;
arguments << command << "--json=o" << "-t" << testType << deviceNode; arguments << command << "--json=o" << "-x" << "-t" << testType << deviceNode;
process.start("pkexec", arguments); process.start("pkexec", arguments);
process.waitForFinished(-1); process.waitForFinished(-1);