handlers: pass config to handlers' init()
The handlers may want to consume config parameters, so pass the struct
config to their init call.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
diff --git a/console-server.h b/console-server.h
index dcedada..5871019 100644
--- a/console-server.h
+++ b/console-server.h
@@ -3,6 +3,7 @@
#include <stdint.h>
struct console;
+struct config;
/* handler API */
enum {
@@ -13,7 +14,8 @@
struct handler {
const char *name;
int (*init)(struct handler *handler,
- struct console *console);
+ struct console *console,
+ struct config *config);
int (*data_in)(struct handler *handler,
uint8_t *buf, size_t len);
void (*fini)(struct handler *handler);