diff options
author | Johnathan Mantey <johnathanx.mantey@intel.com> | 2018-12-13 13:17:56 -0800 |
---|---|---|
committer | Johnathan Mantey <johnathanx.mantey@intel.com> | 2019-02-04 12:37:45 -0800 |
commit | 74a2102e1fcf15097878449cd2989b5facd9b956 (patch) | |
tree | 1d06bef3cb4d1c7793637647e912779fbc7daf09 /user_channel/channel_layer.cpp | |
parent | 2dfe7f8da32764d604b3f6bf893afa9b29ff9a7c (diff) | |
download | phosphor-host-ipmid-74a2102e1fcf15097878449cd2989b5facd9b956.tar.gz phosphor-host-ipmid-74a2102e1fcf15097878449cd2989b5facd9b956.zip |
IPMI channel to NIC device mapping modified within JSON config file
The IPMI to NIC channel mapping was done using a hard coded scheme.
The scheme used generic channel names which were then mapped to
specific device names. The hard coded generic to specific naming
convention is removed, and the JSON file contains the device name
directly.
Change-Id: Ibc6821cae5a26f2666467aba5346d364053f2582
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
Diffstat (limited to 'user_channel/channel_layer.cpp')
-rw-r--r-- | user_channel/channel_layer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/user_channel/channel_layer.cpp b/user_channel/channel_layer.cpp index 12b10c9..0bd7ffe 100644 --- a/user_channel/channel_layer.cpp +++ b/user_channel/channel_layer.cpp @@ -29,8 +29,7 @@ bool doesDeviceExist(const uint8_t chNum) // associated with ethernet interface as the channel number to // eth association is not done. Need to revisit later struct stat fileStat = {0}; - std::string devName("/sys/class/net/" + - getChannelConfigObject().getChannelName(chNum)); + std::string devName("/sys/class/net/" + getChannelName(chNum)); if (stat(devName.data(), &fileStat) != 0) { @@ -138,4 +137,9 @@ ipmi_ret_t getChannelEnabledAuthType(const uint8_t chNum, const uint8_t priv, authType); } +std::string getChannelName(const int chNum) +{ + return getChannelConfigObject().getChannelName(chNum); +} + } // namespace ipmi |