]> git.ozlabs.org Git - petitboot/commit
discover: Add support for checking directories in parser API
authorJeremy Kerr <jk@ozlabs.org>
Fri, 24 Jan 2014 06:39:37 +0000 (14:39 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 30 Jan 2014 13:59:10 +0000 (21:59 +0800)
commit4896183708855fbfd0aa892537fbcc17ed7eb971
tree5bbd851636871982cc26ca59ff1aa0970f6d8116
parenteea9a9fa697654ef26d7e2c1cee3b4ac610db643
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>
discover/grub2/builtins.c
discover/parser.c
discover/parser.h
test/parser/parser-test.h
test/parser/utils.c