[PATCH 2/9] sandbox: bootm: Reject unsupported subcommands
Daniel Golle
daniel at makrotopia.org
Fri Nov 13 16:09:51 PST 2026
Sandbox accepts the bdt and cmdline subcommands without doing anything.
Return -ENOSYS as other architectures do, so sandbox tests can exercise
bootm's subcommand error handling.
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
arch/sandbox/lib/bootm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
index 7a5f6f7d36e..da03f451671 100644
--- a/arch/sandbox/lib/bootm.c
+++ b/arch/sandbox/lib/bootm.c
@@ -6,6 +6,7 @@
#include <bootm.h>
#include <bootstage.h>
+#include <errno.h>
#include <image.h>
#include <asm/io.h>
@@ -68,6 +69,10 @@ int do_bootm_linux(int flag, struct bootm_info *bmi)
{
struct bootm_headers *images = bmi->images;
+ /* No need for those on sandbox */
+ if (flag & BOOTM_STATE_OS_BD_T || flag & BOOTM_STATE_OS_CMDLINE)
+ return -ENOSYS;
+
if (flag & BOOTM_STATE_OS_PREP)
return boot_prep_linux(images);
--
2.56.0
More information about the openwrt-devel
mailing list