mboxd: Don't require mbox
With the DBus interface to the daemon in place it's possible to
implement any hardware interface in terms of the DBus interface. This is
the strategy used to support the IPMI HIOMAP transport. Further, the use
of MBOX is deprecated due to security concerns. We want to drop the
driver from the kernel, which failed to get traction upstream, so make
support optional.
As a consequence, switch the default transport to DBus.
Change-Id: I9f16ca053ce48943dce59b83ca991ec5494580d8
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/test/mbox.c b/test/mbox.c
index 55af00c..c224b84 100644
--- a/test/mbox.c
+++ b/test/mbox.c
@@ -211,11 +211,13 @@
tmpf_destroy(&test.lpc);
}
-int __transport_mbox_init(struct mbox_context *context, const char *path);
+int __transport_mbox_init(struct mbox_context *context, const char *path,
+ const struct transport_ops **ops);
int __lpc_dev_init(struct mbox_context *context, const char *path);
struct mbox_context *mbox_create_frontend_context(int n_windows, size_t len)
{
+ const struct transport_ops *ops;
struct mtd_info_user mtd_info;
int rc;
@@ -242,7 +244,8 @@
* /dev/null and replace it with our own fd for mbox device emulation
* by the test framework.
*/
- __transport_mbox_init(&test.context, "/dev/null");
+ __transport_mbox_init(&test.context, "/dev/null", &ops);
+ test.context.transport = ops;
rc = close(test.context.fds[MBOX_FD].fd);
assert(rc == 0);
test.context.fds[MBOX_FD].fd = test.mbox.fd;