mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 1/3] startup: rename AUTOBOOT_UNKNOWN to more descriptive AUTOBOOT_COUNTDOWN
@ 2020-04-22  7:35 Ahmad Fatoum
  2020-04-22  7:35 ` [PATCH v2 2/3] startup: don't clobber original autoboot state Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2020-04-22  7:35 UTC (permalink / raw)
  To: barebox

If we export the autoboot state variable for customization, having
unknown as default is not so helpful. Rename it to what actually happens
(abortable countdown).

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
v1 -> v2:
  * New commit
---
 common/startup.c | 4 ++--
 include/common.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/startup.c b/common/startup.c
index e251142fca9e..7373ba7d0cd3 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -195,7 +195,7 @@ static bool test_abort(void)
 #define INITFILE "/env/bin/init"
 #define MENUFILE "/env/menu/mainmenu"
 
-static enum autoboot_state autoboot_state = AUTOBOOT_UNKNOWN;
+static enum autoboot_state autoboot_state = AUTOBOOT_COUNTDOWN;
 
 /**
  * set_autoboot_state - set the autoboot state
@@ -229,7 +229,7 @@ enum autoboot_state do_autoboot_countdown(void)
 	char *abortkeys = NULL;
 	unsigned char outkey;
 
-	if (autoboot_state != AUTOBOOT_UNKNOWN)
+	if (autoboot_state != AUTOBOOT_COUNTDOWN)
 		return autoboot_state;
 
 	menu_exists = stat(MENUFILE, &s) == 0;
diff --git a/include/common.h b/include/common.h
index ef2e4e5c31dd..b2533f4176bc 100644
--- a/include/common.h
+++ b/include/common.h
@@ -87,7 +87,7 @@ unsigned long long strtoull_suffix(const char *str, char **endp, int base);
 extern int (*barebox_main)(void);
 
 enum autoboot_state {
-	AUTOBOOT_UNKNOWN,
+	AUTOBOOT_COUNTDOWN,
 	AUTOBOOT_ABORT,
 	AUTOBOOT_MENU,
 	AUTOBOOT_BOOT,
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-23  6:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22  7:35 [PATCH v2 1/3] startup: rename AUTOBOOT_UNKNOWN to more descriptive AUTOBOOT_COUNTDOWN Ahmad Fatoum
2020-04-22  7:35 ` [PATCH v2 2/3] startup: don't clobber original autoboot state Ahmad Fatoum
2020-04-22  7:35 ` [PATCH v2 3/3] startup: add $global.autoboot to make behavior configurable Ahmad Fatoum
2020-04-23  6:30 ` [PATCH v2 1/3] startup: rename AUTOBOOT_UNKNOWN to more descriptive AUTOBOOT_COUNTDOWN Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox