diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-01-24 14:39:37 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-01-30 21:59:10 +0800 |
commit | 4896183708855fbfd0aa892537fbcc17ed7eb971 (patch) | |
tree | 5bbd851636871982cc26ca59ff1aa0970f6d8116 /discover/parser.h | |
parent | eea9a9fa697654ef26d7e2c1cee3b4ac610db643 (diff) | |
download | talos-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 'discover/parser.h')
-rw-r--r-- | discover/parser.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/discover/parser.h b/discover/parser.h index 970d72c..e0e8dc6 100644 --- a/discover/parser.h +++ b/discover/parser.h @@ -62,5 +62,7 @@ int parser_replace_file(struct discover_context *ctx, char *buf, int len); int parser_request_url(struct discover_context *ctx, struct pb_url *url, char **buf, int *len); +int parser_check_dir(struct discover_context *ctx, + struct discover_device *dev, const char *dirname); #endif /* _PARSER_H */ |