ulib: Provide an init function for sandbox

Provide a simple function to set up the library, to avoid having to
worry about the details. This requires the caller to know about
global_data

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-09-04 13:07:52 -06:00
parent 2786961c63
commit 43d2f41234
3 changed files with 37 additions and 14 deletions

View File

@@ -75,4 +75,13 @@ int sandbox_init(int argc, char *argv[], struct global_data *data);
*/
int sandbox_main(int argc, char *argv[]);
/**
* ulib_init_with_data() - set up the U-Boot library
*
* @progname: Program name to use, typically argv[0]
* @data: Global data (must remain valid until the program exits)
* Return: 0 if OK, -ve error code on error
*/
int ulib_init_with_data(char *progname, struct global_data *data);
#endif /* _U_BOOT_SANDBOX_H_ */