Blame SOURCES/0001-Display-proper-logical-name-of-network-device.patch

66f3ee
From 85edb6a1a5734078a58bad21a5e6918e07f360bc Mon Sep 17 00:00:00 2001
66f3ee
From: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
66f3ee
Date: Tue, 30 Apr 2019 17:24:50 +0530
66f3ee
Subject: [PATCH] Display proper logical name of network device
66f3ee
66f3ee
This patch adds support to display proper logical name of
66f3ee
network devices.
66f3ee
66f3ee
Test results:
66f3ee
66f3ee
  *-l-lan
66f3ee
       description: Ethernet interface
66f3ee
       physical id: 2
66f3ee
       bus info: vio@30000002
66f3ee
       logical name: /proc/device-tree/vdevice/l-lan@30000002
66f3ee
66f3ee
With patch:
66f3ee
66f3ee
  *-l-lan
66f3ee
       description: Ethernet interface
66f3ee
       physical id: 2
66f3ee
       bus info: vio@30000002
66f3ee
       logical name: /proc/device-tree/vdevice/l-lan@30000002
66f3ee
       logical name: eth0
66f3ee
66f3ee
Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
66f3ee
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
66f3ee
---
66f3ee
 src/core/hw.cc | 4 ++--
66f3ee
 1 file changed, 2 insertions(+), 2 deletions(-)
66f3ee
66f3ee
diff --git a/src/core/hw.cc b/src/core/hw.cc
66f3ee
index f136383e99fb..4522c1af0fc3 100644
66f3ee
--- a/src/core/hw.cc
66f3ee
+++ b/src/core/hw.cc
66f3ee
@@ -1284,8 +1284,8 @@ void hwNode::merge(const hwNode & node)
66f3ee
     This->handle = node.getHandle();
66f3ee
   if (This->description == "")
66f3ee
     This->description = node.getDescription();
66f3ee
-  if (This->logicalnames.size() == 0)
66f3ee
-    This->logicalnames = node.getLogicalNames();
66f3ee
+  for (unsigned int i = 0; i < node.This->logicalnames.size(); i++)
66f3ee
+    setLogicalName(node.This->logicalnames[i]);
66f3ee
   if (This->businfo == "")
66f3ee
     This->businfo = node.getBusInfo();
66f3ee
   if (This->physid == "")
66f3ee
-- 
66f3ee
2.17.1
66f3ee