vpnor: Configure a handler table in init_vpnor()
Currently the table just mirrors that which is set by the regular
implementation, however getting to that point requires massaging the
code a little. Thus, separate out this change from one that changes the
behaviour of the commands to improve the readability of the latter
change.
Change-Id: I4007a8a4d508c6d850b8cc878bab8f72bd343498
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/vpnor/mboxd_pnor_partition_table.cpp b/vpnor/mboxd_pnor_partition_table.cpp
index db53dc8..fad0c7f 100644
--- a/vpnor/mboxd_pnor_partition_table.cpp
+++ b/vpnor/mboxd_pnor_partition_table.cpp
@@ -10,6 +10,7 @@
#include "xyz/openbmc_project/Common/error.hpp"
#include <phosphor-logging/elog-errors.hpp>
#include <experimental/filesystem>
+#include "vpnor/mboxd_msg.hpp"
int init_vpnor(struct mbox_context *context)
{
@@ -44,6 +45,8 @@
if (context && !context->vpnor)
{
+ context->handlers = vpnor_mbox_handlers;
+
try
{
context->vpnor = new vpnor_partition_table;