dcmi: Put enum ipmi_netfn_sen_cmds inside namespace
The enum is defined in sensorhandler.h as well as here
it may happen that some cpp will include both header files
and it may lead to multiple definition error.
Change-Id: I848de8cbde42831303493862a7bdf8966176b9d1
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/dcmihandler.cpp b/dcmihandler.cpp
index 0508b81..5df6559 100644
--- a/dcmihandler.cpp
+++ b/dcmihandler.cpp
@@ -486,29 +486,39 @@
void register_netfn_dcmi_functions()
{
// <Get Power Limit>
- printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_GRPEXT, IPMI_CMD_DCMI_GET_POWER_LIMIT);
- ipmi_register_callback(NETFUN_GRPEXT, IPMI_CMD_DCMI_GET_POWER_LIMIT, NULL, getPowerLimit,
- PRIVILEGE_USER);
+ printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",
+ NETFUN_GRPEXT, dcmi::Commands::GET_POWER_LIMIT);
+
+ ipmi_register_callback(NETFUN_GRPEXT, dcmi::Commands::GET_POWER_LIMIT,
+ NULL, getPowerLimit, PRIVILEGE_USER);
// <Set Power Limit>
- printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_GRPEXT, IPMI_CMD_DCMI_SET_POWER_LIMIT);
- ipmi_register_callback(NETFUN_GRPEXT, IPMI_CMD_DCMI_SET_POWER_LIMIT, NULL, setPowerLimit,
- PRIVILEGE_OPERATOR);
+ printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",
+ NETFUN_GRPEXT, dcmi::Commands::SET_POWER_LIMIT);
+
+ ipmi_register_callback(NETFUN_GRPEXT, dcmi::Commands::SET_POWER_LIMIT,
+ NULL, setPowerLimit, PRIVILEGE_OPERATOR);
// <Activate/Deactivate Power Limit>
- printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_GRPEXT, IPMI_CMD_DCMI_APPLY_POWER_LIMIT);
- ipmi_register_callback(NETFUN_GRPEXT, IPMI_CMD_DCMI_APPLY_POWER_LIMIT, NULL, applyPowerLimit,
- PRIVILEGE_OPERATOR);
+ printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",
+ NETFUN_GRPEXT, dcmi::Commands::APPLY_POWER_LIMIT);
+
+ ipmi_register_callback(NETFUN_GRPEXT, dcmi::Commands::APPLY_POWER_LIMIT,
+ NULL, applyPowerLimit, PRIVILEGE_OPERATOR);
// <Get Asset Tag>
- printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_GRPEXT, IPMI_CMD_DCMI_GET_ASSET_TAG);
- ipmi_register_callback(NETFUN_GRPEXT, IPMI_CMD_DCMI_GET_ASSET_TAG, NULL, getAssetTag,
- PRIVILEGE_USER);
+ printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",
+ NETFUN_GRPEXT, dcmi::Commands::GET_ASSET_TAG);
+
+ ipmi_register_callback(NETFUN_GRPEXT, dcmi::Commands::GET_ASSET_TAG,
+ NULL, getAssetTag, PRIVILEGE_USER);
// <Set Asset Tag>
- printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_GRPEXT, IPMI_CMD_DCMI_SET_ASSET_TAG);
- ipmi_register_callback(NETFUN_GRPEXT, IPMI_CMD_DCMI_SET_ASSET_TAG, NULL, setAssetTag,
- PRIVILEGE_OPERATOR);
+ printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",
+ NETFUN_GRPEXT, dcmi::Commands::SET_ASSET_TAG);
+
+ ipmi_register_callback(NETFUN_GRPEXT, dcmi::Commands::SET_ASSET_TAG,
+ NULL, setAssetTag, PRIVILEGE_OPERATOR);
return;
}
// 956379