summaryrefslogtreecommitdiffstats
path: root/test/parser/parser-test.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-01-24 14:39:37 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-01-30 21:59:10 +0800
commit4896183708855fbfd0aa892537fbcc17ed7eb971 (patch)
tree5bbd851636871982cc26ca59ff1aa0970f6d8116 /test/parser/parser-test.h
parenteea9a9fa697654ef26d7e2c1cee3b4ac610db643 (diff)
downloadtalos-petitboot-4896183708855fbfd0aa892537fbcc17ed7eb971.tar.gz
talos-petitboot-4896183708855fbfd0aa892537fbcc17ed7eb971.zip
discover: Add support for checking directories in parser API
This change adds a function to the parser API: int parser_check_dir(struct discover_context *ctx, struct discover_device *dev, const char *dirname) - which allows parsers to check for the presence of a directory (path of 'dirname') on the device ('dev'). We use this in the GRUB2 parser to implement the `test -d` check. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'test/parser/parser-test.h')
-rw-r--r--test/parser/parser-test.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/parser/parser-test.h b/test/parser/parser-test.h
index 7c40650..631f1e5 100644
--- a/test/parser/parser-test.h
+++ b/test/parser/parser-test.h
@@ -36,6 +36,8 @@ void test_remove_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, const void *data, int size);
+void test_add_dir(struct parser_test *test, struct discover_device *dev,
+ const char *dirname);
void test_set_event_source(struct parser_test *test);
void test_set_event_param(struct event *event, const char *name,
const char *value);
OpenPOWER on IntegriCloud