mirror of
https://xff.cz/git/u-boot/
synced 2025-10-22 10:31:56 +02:00
bootstd: Add a way to set up a bootflow
Add a function to init a bootflow, to reduce code duplication. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -339,6 +339,15 @@ int bootflow_scan_next(struct bootflow_iter *iter, struct bootflow *bflow)
|
||||
} while (1);
|
||||
}
|
||||
|
||||
void bootflow_init(struct bootflow *bflow, struct udevice *bootdev,
|
||||
struct udevice *meth)
|
||||
{
|
||||
memset(bflow, '\0', sizeof(*bflow));
|
||||
bflow->dev = bootdev;
|
||||
bflow->method = meth;
|
||||
bflow->state = BOOTFLOWST_BASE;
|
||||
}
|
||||
|
||||
void bootflow_free(struct bootflow *bflow)
|
||||
{
|
||||
free(bflow->name);
|
||||
|
||||
Reference in New Issue
Block a user