diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-09-19 17:16:53 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-09-19 21:36:33 +0800 |
commit | f611bde3f182e9a4befb48a0160d1831708aca67 (patch) | |
tree | cacf467246c85c491bf91b3fe46c448c5fdbab94 /test/parser/parser-test.h | |
parent | 4926cde5c97d09794ec33cca1321bb05a8d43304 (diff) | |
download | talos-petitboot-f611bde3f182e9a4befb48a0160d1831708aca67.tar.gz talos-petitboot-f611bde3f182e9a4befb48a0160d1831708aca67.zip |
discover: Remove unnecessary event passing
Currently, we pass "events" between the udev, user-event and
device-handler layers. These events all get sent through
device_handler_event, then de-multiplexed to an appropriate handler,
depending on their source.
Instead, just export relevant device_handler functions, and have the
(old) event sources call these functions directly.
This also means we can include a lot more of the device hander code in
the parser tests.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'test/parser/parser-test.h')
-rw-r--r-- | test/parser/parser-test.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parser/parser-test.h b/test/parser/parser-test.h index df9670f..7e43a68 100644 --- a/test/parser/parser-test.h +++ b/test/parser/parser-test.h @@ -9,6 +9,7 @@ struct parser_test { struct device_handler *handler; struct discover_context *ctx; + struct config *config; struct { void *buf; size_t size; @@ -19,7 +20,7 @@ struct parser_test { void __register_parser(struct parser *parser); /* test functions */ -struct discover_device *test_create_device(struct discover_context *ctx, +struct discover_device *test_create_device(struct parser_test *test, const char *name); #define test_read_conf_data(t, d) \ |