summaryrefslogtreecommitdiffstats
path: root/user_channel/channel_layer.cpp
diff options
context:
space:
mode:
authorRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2019-01-04 23:48:02 +0530
committerRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2019-02-02 15:51:52 +0000
commit73906b9c9123218a7f8fc86db34957b965c53870 (patch)
treea975898cdeca7619a6aedb0d7deecdf7b33de707 /user_channel/channel_layer.cpp
parentfc71115b7836d6bf33550561cf5db213686f55a8 (diff)
downloadphosphor-host-ipmid-73906b9c9123218a7f8fc86db34957b965c53870.tar.gz
phosphor-host-ipmid-73906b9c9123218a7f8fc86db34957b965c53870.zip
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 <richard.marian.thomaiyar@linux.intel.com>
Diffstat (limited to 'user_channel/channel_layer.cpp')
-rw-r--r--user_channel/channel_layer.cpp6
1 files changed, 3 insertions, 3 deletions
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)
{
OpenPOWER on IntegriCloud