Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions deepin-devicemanager/src/DeviceManager/DeviceStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,8 @@ bool DeviceStorage::setHwinfoInfo(const QMap<QString, QString> &mapInfo)
QFile file(Path);
if (file.open(QIODevice::ReadOnly)) {
QString output = file.readAll();
if (output.contains("310", Qt::CaseInsensitive)) {
m_Interface = "UFS 3.1";
} else if (output.contains("300", Qt::CaseInsensitive)) {
m_Interface = "UFS 3.0";
} else if (output.contains("400", Qt::CaseInsensitive)) {
m_Interface = "UFS 4.0";
if (!output.isEmpty()) {
m_Interface = "UFS";
}
file.close();
}
Expand Down
10 changes: 5 additions & 5 deletions deepin-devicemanager/src/GenerateDevice/HWGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void HWGenerator::generatorDiskDevice()
tempMap["Name"] = "nouse";

if (Common::specialComType == 2) {
tempMap["Interface"] = "UFS 3.1";
tempMap["Interface"] = "UFS";
}

// 读取interface版本
Expand All @@ -297,10 +297,10 @@ void HWGenerator::generatorDiskDevice()
exitCode = process.exitCode();
if (exitCode != 127 && exitCode != 126) {
deviceInfo = process.readAllStandardOutput();
if (deviceInfo.trimmed() == "310") {
tempMap["interface"] = "UFS 3.1";
} else if (deviceInfo.trimmed() == "300")
tempMap["interface"] = "UFS 3.0";

if (!deviceInfo.trimmed().isEmpty()) {
tempMap["interface"] = "UFS";
}
}
}
}
Expand Down