Skip to content

Commit 2615100

Browse files
committed
fix: [Stroage-interface] The interface show error.
-- In the special platform, the stroage interface show error.
1 parent 93a5108 commit 2615100

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

service/diskoperation/DeviceStorage.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,15 @@ void DeviceStorage::getDiskInfoInterface(const QString &devicePath, QString &int
587587
if (file.open(QIODevice::ReadOnly)) {
588588
if (model == file.readLine().simplified()) {
589589
QString spec_version = Utils::readContent("/sys/block/sdd/device/spec_version").trimmed();
590-
if (!spec_version.isEmpty())
591-
interface = (spec_version == "300") ? "UFS 3.0" : "UFS 3.1";
590+
if (!spec_version.isEmpty()) {
591+
if (spec_version.contains("300")) {
592+
interface = "UFS 3.0";
593+
} else if (spec_version.contains("310")) {
594+
interface = "UFS 3.1";
595+
} else if (spec_version.contains("400")) {
596+
interface = "UFS 4.0";
597+
}
598+
}
592599
}
593600
file.close();
594601
}

0 commit comments

Comments
 (0)