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

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