update oemcommands.hpp to use new API
All the command handler numbers and netfn numbers were done
using the old API. This updates all the enums to be ipmi::Cmd
or ipmi::NetFn types. This improves readability by eliminating
unneeded static_casts and brings the legacy code to the present.
One minor fix, otherwise the code is the same. The call to
registerFilter was passing a netfn instead of a priority. It compiled
but it was incorrect. This updates it to use the correct parameter.
Tested: builds and produces the same binary output (other than the
aforementioned registerFilter fix)
Change-Id: I7e83123245b3f340088f8ec75a31b7611d0ecda0
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/src/multinodecommands.cpp b/src/multinodecommands.cpp
index 7e79fc0..5966605 100644
--- a/src/multinodecommands.cpp
+++ b/src/multinodecommands.cpp
@@ -116,20 +116,17 @@
phosphor::logging::log<phosphor::logging::level::INFO>(
"Registering MultiNode commands");
- ipmi::registerHandler(
- ipmi::prioOemBase, ipmi::netFnOemOne,
- static_cast<ipmi::Cmd>(IPMINetfnMultiNodeCmd::cmdGetMultiNodePresence),
- ipmi::Privilege::User, ipmiGetMultiNodePresence);
+ ipmi::registerHandler(ipmi::prioOemBase, ipmi::intel::netFnGeneral,
+ ipmi::intel::general::cmdGetMultiNodePresence,
+ ipmi::Privilege::User, ipmiGetMultiNodePresence);
- ipmi::registerHandler(
- ipmi::prioOemBase, ipmi::netFnOemOne,
- static_cast<ipmi::Cmd>(IPMINetfnMultiNodeCmd::cmdGetMultiNodeId),
- ipmi::Privilege::User, ipmiGetMultiNodeId);
+ ipmi::registerHandler(ipmi::prioOemBase, ipmi::intel::netFnGeneral,
+ ipmi::intel::general::cmdGetMultiNodeId,
+ ipmi::Privilege::User, ipmiGetMultiNodeId);
- ipmi::registerHandler(
- ipmi::prioOemBase, ipmi::netFnOemOne,
- static_cast<ipmi::Cmd>(IPMINetfnMultiNodeCmd::cmdGetMultiNodeRole),
- ipmi::Privilege::User, ipmiGetMultiNodeRole);
+ ipmi::registerHandler(ipmi::prioOemBase, ipmi::intel::netFnGeneral,
+ ipmi::intel::general::cmdGetMultiNodeRole,
+ ipmi::Privilege::User, ipmiGetMultiNodeRole);
}
} // namespace ipmi