
* if defined run env "premonitor" before Main Loop for Monitor Processing
Signed-off-by: Pali Rohár pali.rohar@gmail.com --- Changes since v1: - use run_command instead run_command2
Changes since original version: - removed #ifdef CONFIG_PREMONITOR in main.c
common/env_common.c | 3 +++ common/main.c | 4 ++++ 2 files changed, 7 insertions(+)
diff --git a/common/env_common.c b/common/env_common.c index c33d22d..f1b2e3e 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -92,6 +92,9 @@ const uchar default_environment[] = { #ifdef CONFIG_PREBOOT "preboot=" CONFIG_PREBOOT "\0" #endif +#ifdef CONFIG_PREMONITOR + "premonitor=" CONFIG_PREMONITOR "\0" +#endif #ifdef CONFIG_ROOTPATH "rootpath=" CONFIG_ROOTPATH "\0" #endif diff --git a/common/main.c b/common/main.c index 3b9e39a..aa5eb72 100644 --- a/common/main.c +++ b/common/main.c @@ -397,6 +397,10 @@ void main_loop (void) #endif /* CONFIG_MENUKEY */ #endif /* CONFIG_BOOTDELAY */
+ s = getenv("premonitor"); + if (s) + run_command(s, 0); + /* * Main Loop for Monitor Command Processing */