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 Signed-off-by: Lianbo Jiang --- 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 f136383e99fb..4522c1af0fc3 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 == "") -- 2.17.1