From 78398652723b6fe743751ffb19d8256b7e3e0a4e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 21 Oct 2021 21:08:52 -0600 Subject: bootm: Tidy up use of autostart env var This has different semantics in different places. Go with the bootm method and put it in a common function so that the behaviour is consistent in U-Boot. Update the docs. To be clear, this changes the way that 'bootelf' and standalone boot work. Before, if autostart was set to "fred" or "YES", for example, they would consider that a "yes". This may change behaviour for some boards, but the only in-tree boards which mention autostart use "no" to disable it, which will still work. Signed-off-by: Simon Glass Suggested-by: Wolfgang Denk --- include/env.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/env.h') diff --git a/include/env.h b/include/env.h index ee5e30d..ff8943e 100644 --- a/include/env.h +++ b/include/env.h @@ -134,6 +134,13 @@ int env_get_f(const char *name, char *buf, unsigned int len); int env_get_yesno(const char *var); /** + * env_get_autostart() - Check if autostart is enabled + * + * @return true if the "autostart" env var exists and is set to "yes" + */ +bool env_get_autostart(void); + +/** * env_set() - set an environment variable * * This sets or deletes the value of an environment variable. For setting the -- cgit v1.1