summaryrefslogtreecommitdiffstats
path: root/test/parser/parser-test.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-09-27 14:19:20 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-10-01 12:52:00 +0800
commitb86a7a0533c4d723ea940ac2071f845f165f832c (patch)
treec01b932e9a31960e3acf6bbeddd4cc7f9d657ea1 /test/parser/parser-test.h
parente28232f4b8941ccd151abaaae3f18c32400436f3 (diff)
downloadtalos-petitboot-b86a7a0533c4d723ea940ac2071f845f165f832c.tar.gz
talos-petitboot-b86a7a0533c4d723ea940ac2071f845f165f832c.zip
discover: Add parser_request_file
Add a function to allow parsers to access files on a local device. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'test/parser/parser-test.h')
-rw-r--r--test/parser/parser-test.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/parser/parser-test.h b/test/parser/parser-test.h
index 7e43a68..eb43c25 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 list files;
struct config *config;
struct {
void *buf;
@@ -35,6 +36,12 @@ int test_run_parser(struct parser_test *test, const char *parser_name);
void test_hotplug_device(struct parser_test *test, struct discover_device *dev);
+void test_add_file_data(struct parser_test *test, struct discover_device *dev,
+ const char *filename, void *data, int size);
+
+#define test_add_file_string(test, dev, filename, str) \
+ test_add_file_data(test, dev, filename, str, sizeof(str))
+
struct discover_boot_option *get_boot_option(struct discover_context *ctx,
int idx);
OpenPOWER on IntegriCloud