From 73906b9c9123218a7f8fc86db34957b965c53870 Mon Sep 17 00:00:00 2001 From: Richard Marian Thomaiyar Date: Fri, 4 Jan 2019 23:48:02 +0530 Subject: Use network interface name as channel name Use network interface name as channel name for the LAN channels. Mapper related to convert IPMI LAN reference to network interface is not needed anymore, and the same has been removed. Unit-test: verified ipmitool channel info for channel 1 & 2 and made sure it works fine as expected. Change-Id: Id87e2924a2a21a846507d6378b1b615000280f06 Signed-off-by: Richard Marian Thomaiyar --- user_channel/channel_layer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_channel/channel_layer.cpp') diff --git a/user_channel/channel_layer.cpp b/user_channel/channel_layer.cpp index 4cab58f..12b10c9 100644 --- a/user_channel/channel_layer.cpp +++ b/user_channel/channel_layer.cpp @@ -28,9 +28,9 @@ bool doesDeviceExist(const uint8_t chNum) // TODO: This is not the reliable way to find the device // associated with ethernet interface as the channel number to // eth association is not done. Need to revisit later - struct stat fileStat; - std::string devName("/sys/class/net/eth"); - devName += std::to_string(chNum - 1); + struct stat fileStat = {0}; + std::string devName("/sys/class/net/" + + getChannelConfigObject().getChannelName(chNum)); if (stat(devName.data(), &fileStat) != 0) { -- cgit v1.2.1