Hi He, On 2026-10-26T14:02:15, He Yong <[email protected]> wrote: > bootstd: Export the script bootflow execution handler > > Make script_boot() available as bootmeth_script_boot() so another > bootmeth can reuse the device environment setup and script execution > without duplicating the filesystem script bootmeth's handler. > > Signed-off-by: He Yong <[email protected]> > > boot/bootmeth_script.c | 4 ++-- > include/bootmeth.h | 12 ++++++++++++ > 2 files changed, 14 insertions(+), 2 deletions(-)
> diff --git a/include/bootmeth.h b/include/bootmeth.h > @@ -425,4 +425,16 @@ int bootmeth_common_read_file(struct udevice *dev, > struct bootflow *bflow, > + * Set the device and partition environment variables and execute the script > + * stored in the bootflow buffer. > + * > + * @dev: Bootmeth device > + * @bflow: Bootflow containing the script image > + * @return 0 on success, or a error code Please can you use 'Return:' here (the kernel-doc form used by most of this file) and change 'a error code' to '-ve on error'. It would be worth listing the bootflow fields this uses, since a new caller needs to know them: bflow->buf for the script, bflow->subdir for the 'prefix' variable, and bflow->blk and bflow->part for devtype/devnum/distro_bootpart. Patch 3 sets bflow->subdir to an empty string just to satisfy this, so it is easy to miss. Regards, Simon
