Skip to content

Commit 136763d

Browse files
GongHeng2017wangrong1069
authored andcommitted
fix: [Stroage-interface] The interface show error.
-- In the special platform, the stroage interface show error.
1 parent 0ffefcd commit 136763d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

service/diskoperation/DeviceStorage.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,13 @@ void DeviceStorage::getDiskInfoInterface(const QString &devicePath, QString &int
743743
QString spec_version = Utils::readContent("/sys/block/sdd/device/spec_version").trimmed();
744744
if (!spec_version.isEmpty()) {
745745
qDebug() << "spec_version is not empty";
746-
interface = (spec_version == "300") ? "UFS 3.0" : "UFS 3.1";
746+
if (spec_version.contains("300")) {
747+
interface = "UFS 3.0";
748+
} else if (spec_version.contains("310")) {
749+
interface = "UFS 3.1";
750+
} else if (spec_version.contains("400")) {
751+
interface = "UFS 4.0";
752+
}
747753
}
748754
}
749755
file.close();

0 commit comments

Comments
 (0)