mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/4] startup: fix autoboot_state in case of abort
Date: Wed, 13 Mar 2024 20:56:05 +0100	[thread overview]
Message-ID: <20240313195606.3911219-3-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20240313195606.3911219-1-m.felsch@pengutronix.de>

Currently do_autoboot_countdown() always returns AUTOBOOT_BOOT if no
interactive console was found which is wrong if global_autoboot_state
was set to AUTOBOOT_ABORT. Fix this by checking the
global_autoboot_state as well.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 common/startup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/startup.c b/common/startup.c
index bbba72f89255..d7f7b5163e87 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -174,7 +174,8 @@ enum autoboot_state do_autoboot_countdown(void)
 	if (autoboot_state != AUTOBOOT_UNKNOWN)
 		return autoboot_state;
 
-	if (!console_get_first_active()) {
+	if (!console_get_first_active() &&
+	    global_autoboot_state != AUTOBOOT_ABORT) {
 		printf("\nNon-interactive console, booting system\n");
 		return autoboot_state = AUTOBOOT_BOOT;
 	}
-- 
2.39.2




  parent reply	other threads:[~2024-03-13 19:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 19:56 [PATCH 1/4] fastboot: add support to set fastboot_bbu from board code Marco Felsch
2024-03-13 19:56 ` [PATCH 2/4] boot: add helper to set default boot source from board file Marco Felsch
2024-03-13 19:56 ` Marco Felsch [this message]
2024-03-13 19:56 ` [PATCH 4/4] common: barebox_banner: fix missing newline Marco Felsch
2024-03-15  7:20 ` [PATCH 1/4] fastboot: add support to set fastboot_bbu from board code Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240313195606.3911219-3-m.felsch@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox