diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-02-01 16:11:43 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-08-15 13:03:28 +1000 |
commit | ff7293bba1fd4cdf54bb90bd1b7a38dd393fee69 (patch) | |
tree | 39c5d79e99c48d577ed9f8a26114b2d8407cfe9e /test/parser | |
parent | 9f191cc3c194ed51534c22e2dae15b2c08c8abc2 (diff) | |
download | talos-petitboot-ff7293bba1fd4cdf54bb90bd1b7a38dd393fee69.tar.gz talos-petitboot-ff7293bba1fd4cdf54bb90bd1b7a38dd393fee69.zip |
discover: Handle and track plugin_options
Track plugin_options in the device_handler. Plugins can be added with
device_handler_add_plugin_option() and accessed via
device_handler_get_plugin().
Extend discover_server to support the new 'add' and 'remove' pb-protocol
actions and advertise new plugins to connecting clients.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'test/parser')
-rw-r--r-- | test/parser/Makefile.am | 1 | ||||
-rw-r--r-- | test/parser/handler.c | 6 | ||||
-rw-r--r-- | test/parser/user-event.c | 13 |
3 files changed, 20 insertions, 0 deletions
diff --git a/test/parser/Makefile.am b/test/parser/Makefile.am index 9a6be6d..fa644fe 100644 --- a/test/parser/Makefile.am +++ b/test/parser/Makefile.am @@ -100,6 +100,7 @@ test_parser_libtest_ro_SOURCES = \ test/parser/utils.c \ test/parser/handler.c \ test/parser/network.c \ + test/parser/user-event.c \ test/parser/parser-test.h \ discover/yaboot-parser.c \ discover/kboot-parser.c \ diff --git a/test/parser/handler.c b/test/parser/handler.c index e455c22..a9856b4 100644 --- a/test/parser/handler.c +++ b/test/parser/handler.c @@ -7,6 +7,7 @@ #include "device-handler.h" struct network; +struct client; typedef void (*boot_status_fn)(void *arg, struct status *); @@ -110,3 +111,8 @@ void pending_network_jobs_start(void) void pending_network_jobs_cancel(void) { } + +void discover_server_notify_plugins_remove(struct discover_server *server) +{ + (void)server; +} diff --git a/test/parser/user-event.c b/test/parser/user-event.c new file mode 100644 index 0000000..43d15b7 --- /dev/null +++ b/test/parser/user-event.c @@ -0,0 +1,13 @@ + +#include <assert.h> + +#include <types/types.h> + +struct device_handler; + +void device_handler_add_plugin_option(struct device_handler *handler, + struct plugin_option *opt) +{ + (void)handler; + (void)opt; +} |