bootstd: Provide a bootmeth method to obtain state info
Some bootmeths can provide information about what is available to boot. For example, VBE simple provides access to the firmware state. Add a new method for this, along with a sandbox test. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -20,6 +20,16 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int bootmeth_get_state_desc(struct udevice *dev, char *buf, int maxsize)
|
||||
{
|
||||
const struct bootmeth_ops *ops = bootmeth_get_ops(dev);
|
||||
|
||||
if (!ops->get_state_desc)
|
||||
return -ENOSYS;
|
||||
|
||||
return ops->get_state_desc(dev, buf, maxsize);
|
||||
}
|
||||
|
||||
int bootmeth_check(struct udevice *dev, struct bootflow_iter *iter)
|
||||
{
|
||||
const struct bootmeth_ops *ops = bootmeth_get_ops(dev);
|
||||
|
||||
Reference in New Issue
Block a user