Projects
Eulaceura:Factory
deepin-devicemanager
_service:obs_scm:0002-fix-Ethernet-Controller-X...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0002-fix-Ethernet-Controller-X710-disable.patch of Package deepin-devicemanager
From 0f2dfc4c0e377d0cf2d6723ac1d5bbd0ec391c13 Mon Sep 17 00:00:00 2001 From: shuaijie <shuaijie@uniontech.com> Date: Thu, 13 Apr 2023 21:46:26 +0800 Subject: [PATCH] fix: Ethernet Controller X710 disable Ethernet Controller X710 disable Log: Ethernet Controller X710 disable Bug: https://pms.uniontech.com/bug-view-188969.html Change-Id: I93d8157652e23796d91d9ba293f887c988502b0f --- deepin-devicemanager/src/GenerateDevice/CmdTool.cpp | 5 ++++- .../src/GenerateDevice/DeviceGenerator.cpp | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/deepin-devicemanager/src/GenerateDevice/CmdTool.cpp b/deepin-devicemanager/src/GenerateDevice/CmdTool.cpp index 6a018adf..0f0f93b2 100644 --- a/deepin-devicemanager/src/GenerateDevice/CmdTool.cpp +++ b/deepin-devicemanager/src/GenerateDevice/CmdTool.cpp @@ -738,7 +738,10 @@ void CmdTool::getMapInfoFromLshw(const QString &info, QMap<QString, QString> &ma mapInfo[attr[0].trimmed()] += attr[1].trimmed(); } } else { - mapInfo.insert(words[0].trimmed(), words[1].trimmed()); + if (info.startsWith("network") && true == words[0].contains("logical name") && true == words[1].contains("dev/fb")) { + continue; + } else + mapInfo.insert(words[0].trimmed(), words[1].trimmed()); } } } diff --git a/deepin-devicemanager/src/GenerateDevice/DeviceGenerator.cpp b/deepin-devicemanager/src/GenerateDevice/DeviceGenerator.cpp index 219ca518..7f4b2d51 100644 --- a/deepin-devicemanager/src/GenerateDevice/DeviceGenerator.cpp +++ b/deepin-devicemanager/src/GenerateDevice/DeviceGenerator.cpp @@ -27,6 +27,7 @@ // Qt库文件 #include <QDebug> +#include <QDir> DeviceGenerator::DeviceGenerator(QObject *parent) : QObject(parent) @@ -173,8 +174,14 @@ void DeviceGenerator::generatorNetworkDevice() for (; it != lstInfo.end(); ++it) { if ((*it).size() < 2) continue; - if((*it).find("logical name") == (*it).end() || (*it).find("serial") == (*it).end()) + if ((*it).find("logical name") == (*it).end() || (*it).find("serial") == (*it).end()) continue; + QString logicalname = (*it).value("logical name"); + QString sysClassNet_path = "/sys/class/net/" + logicalname + "/device"; + QDir dir(sysClassNet_path); + if (! dir.exists()) + continue; + DeviceNetwork *device = new DeviceNetwork(); device->setInfoFromLshw(*it); DeviceManager::instance()->addNetworkDevice(device); -- 2.20.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2