From 725ddf1f24f7d08aa344f64d06c62cf5f50a6b6c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 15 Dec 2023 20:14:20 -0700 Subject: bootm: Tidy up boot_selected_os() Use struct bootm_info with this function, to avoiding needing to create a new one. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- boot/bootm_os.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'boot/bootm_os.c') diff --git a/boot/bootm_os.c b/boot/bootm_os.c index 4f547b1b114..47a5fd78fb6 100644 --- a/boot/bootm_os.c +++ b/boot/bootm_os.c @@ -566,20 +566,15 @@ __weak void board_preboot_os(void) /* please define board specific board_preboot_os() */ } -int boot_selected_os(int argc, char *const argv[], int state, - struct bootm_headers *images, boot_os_fn *boot_fn) +int boot_selected_os(int state, struct bootm_info *bmi, boot_os_fn *boot_fn) { - struct bootm_info bmi; arch_preboot_os(); board_preboot_os(); - bmi.argc = argc; - bmi.argv = argv; - bmi.images = images; - boot_fn(state, &bmi); + boot_fn(state, bmi); /* Stand-alone may return when 'autostart' is 'no' */ - if (images->os.type == IH_TYPE_STANDALONE || + if (bmi->images->os.type == IH_TYPE_STANDALONE || IS_ENABLED(CONFIG_SANDBOX) || state == BOOTM_STATE_OS_FAKE_GO) /* We expect to return */ return 0; -- cgit v1.2.3