From 5798f02f861ca399b5bc7a8876a45bdc67e46742e065ed45a9df97683d96e0fe Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 2 May 2019 09:58:51 +0000 Subject: [PATCH] - Fix displaying proper logical name of network device bsc#1133923 * lswh-logical-name-iface.patch OBS-URL: https://build.opensuse.org/package/show/hardware/lshw?expand=0&rev=26 --- lshw.changes | 6 +++++ lshw.spec | 3 +++ lswh-logical-name-iface.patch | 46 +++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 lswh-logical-name-iface.patch diff --git a/lshw.changes b/lshw.changes index 5035788..e7e5ff2 100644 --- a/lshw.changes +++ b/lshw.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 2 09:56:21 UTC 2019 - Martin Pluskal + +- Fix displaying proper logical name of network device bsc#1133923 + * lswh-logical-name-iface.patch + ------------------------------------------------------------------- Thu Mar 28 09:34:43 UTC 2019 - Martin Pluskal diff --git a/lshw.spec b/lshw.spec index e95e42c..faf7676 100644 --- a/lshw.spec +++ b/lshw.spec @@ -27,6 +27,8 @@ URL: https://www.ezix.org/project/wiki/HardwareLiSter Source: lshw-%{version}.tar.xz Source1: lshw.desktop.in Source2: lshw.png +# PATCH-FIX-UPSTREAM lswh-logical-name-iface.patch bsc#1133923 +Patch0: lswh-logical-name-iface.patch BuildRequires: gcc-c++ BuildRequires: hicolor-icon-theme BuildRequires: libpng-devel @@ -76,6 +78,7 @@ http://www.ezix.org/software/lshw.html %prep %setup -q +%patch0 -p1 %build make \ diff --git a/lswh-logical-name-iface.patch b/lswh-logical-name-iface.patch new file mode 100644 index 0000000..ad38644 --- /dev/null +++ b/lswh-logical-name-iface.patch @@ -0,0 +1,46 @@ +From 85edb6a1a5734078a58bad21a5e6918e07f360bc Mon Sep 17 00:00:00 2001 +From: Mamatha Inamdar +Date: Tue, 30 Apr 2019 17:24:50 +0530 +Subject: [PATCH] Display proper logical name of network device + +This patch adds support to display proper logical name of +network devices. + +Test results: + + *-l-lan + description: Ethernet interface + physical id: 2 + bus info: vio@30000002 + logical name: /proc/device-tree/vdevice/l-lan@30000002 + +With patch: + + *-l-lan + description: Ethernet interface + physical id: 2 + bus info: vio@30000002 + logical name: /proc/device-tree/vdevice/l-lan@30000002 + logical name: eth0 + +Signed-off-by: Mamatha Inamdar +Signed-off-by: Shivaprasad G Bhat +--- + src/core/hw.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/core/hw.cc b/src/core/hw.cc +index f136383..4522c1a 100644 +--- a/src/core/hw.cc ++++ b/src/core/hw.cc +@@ -1284,8 +1284,8 @@ void hwNode::merge(const hwNode & node) + This->handle = node.getHandle(); + if (This->description == "") + This->description = node.getDescription(); +- if (This->logicalnames.size() == 0) +- This->logicalnames = node.getLogicalNames(); ++ for (unsigned int i = 0; i < node.This->logicalnames.size(); i++) ++ setLogicalName(node.This->logicalnames[i]); + if (This->businfo == "") + This->businfo = node.getBusInfo(); + if (This->physid == "")