diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2019-11-11 19:30:41 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2019-11-29 13:54:10 +0800 |
commit | b22445748f44ed6965f31f45b39abb690d24ec47 (patch) | |
tree | cb9f942dac9ff19cc1786ea23f9f5a3509deec48 /discover/grub2/grub2.h | |
parent | 9fc2ac627df17ddc8e7c2735053aeb9e1252ff6e (diff) | |
download | talos-petitboot-b22445748f44ed6965f31f45b39abb690d24ec47.tar.gz talos-petitboot-b22445748f44ed6965f31f45b39abb690d24ec47.zip |
discover/grub2: Allow (device)/path references in general script usage
Currently, we have support for grub2 (device)/path syntax for boot
resources. This change allows this syntax for general paths in grub2
scripts (for example, -f tests).
This involves exposing grub2_lookup_device, to allow the script
execution code to resolve pathnames.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/grub2/grub2.h')
-rw-r--r-- | discover/grub2/grub2.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/discover/grub2/grub2.h b/discover/grub2/grub2.h index ef32d4b..eabd6d6 100644 --- a/discover/grub2/grub2.h +++ b/discover/grub2/grub2.h @@ -200,6 +200,8 @@ bool resolve_grub2_resource(struct device_handler *handler, /* grub-style device+path parsing */ struct grub2_file *grub2_parse_file(struct grub2_script *script, const char *str); +struct discover_device *grub2_lookup_device(struct device_handler *handler, + const char *desc); /* external parser api */ struct grub2_parser *grub2_parser_create(struct discover_context *ctx); |