Skip to contentSkip to conversation

New config variable CONFIG_PREMONITOR

PATCH New Pali Rohár 1 participant 1 message Aug 31, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 14/15 New config variable CONFIG_PREMONITOR

* if defined run env "premonitor" before Main Loop for Monitor Command Processing

---
 common/env_common.c |    3 +++
 common/main.c       |   10 ++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
common/env_common.c +3 -0
index 19149b5..fe9e525 100644
@@ -99,6 +99,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="	MK_STR(CONFIG_ROOTPATH)		"\0"
 #endif
common/main.c +10 -0
index f28b250..b1fb453 100644
@@ -413,6 +413,16 @@ void main_loop (void)
 	}
 #endif
 
+#ifdef CONFIG_PREMONITOR
+	if ((s = getenv ("premonitor")) != NULL) {
+# ifndef CONFIG_SYS_HUSH_PARSER
+		run_command (s, 0);
+# else
+		parse_string_outer(s, FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP);
+# endif
+	}
+#endif /* CONFIG_PREMONITOR */
+
 	/*
 	 * Main Loop for Monitor Command Processing
 	 */
Signature · 7 lines
1.7.4.1


--nextPart1511561.nRVgJThL9n
Content-Disposition: attachment; filename="0015-RX-51-Add-support-for-bootmenu.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="UTF-8"; name="0015-RX-51-Add-support-for-bootmenu.patch"