public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Allow console input to be disabled
@ 2008-07-30 12:17 Mark Jackson
  2008-08-07 10:27 ` Haavard Skinnemoen
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Jackson @ 2008-07-30 12:17 UTC (permalink / raw)
  To: u-boot

Added CONFIG_SILENT_CONSOLE_INPUT define.

When used (in conjunction with CONFIG_SILENT_CONSOLE) it disables all console input.

---

 common/console.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/common/console.c b/common/console.c
index 1b095b1..ab071e2 100644
--- a/common/console.c
+++ b/common/console.c
@@ -162,6 +162,11 @@ void fprintf (int file, const char *fmt, ...)
 
 int getc (void)
 {
+#if defined(CONFIG_SILENT_CONSOLE) && defined(CONFIG_SILENT_CONSOLE_INPUT)
+	if (gd->flags & GD_FLG_SILENT)
+		return 0;
+#endif
+
 	if (gd->flags & GD_FLG_DEVINIT) {
 		/* Get from the standard input */
 		return fgetc (stdin);
@@ -173,6 +178,11 @@ int getc (void)
 
 int tstc (void)
 {
+#if defined(CONFIG_SILENT_CONSOLE) && defined(CONFIG_SILENT_CONSOLE_INPUT)
+	if (gd->flags & GD_FLG_SILENT)
+		return 0;
+#endif
+
 	if (gd->flags & GD_FLG_DEVINIT) {
 		/* Test the standard input */
 		return ftstc (stdin);

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

end of thread, other threads:[~2008-08-11 13:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 12:17 [U-Boot-Users] [PATCH] Allow console input to be disabled Mark Jackson
2008-08-07 10:27 ` Haavard Skinnemoen
2008-08-07 12:19   ` Detlev Zundel
2008-08-07 12:43     ` Jerry Van Baren
2008-08-09 23:16       ` Wolfgang Denk
2008-08-10 17:45         ` Mark Jackson
2008-08-11  7:25         ` Haavard Skinnemoen
2008-08-11  8:28           ` Wolfgang Denk
2008-08-11  8:36             ` Wolfgang Denk
2008-08-11 11:19             ` Haavard Skinnemoen
2008-08-11 12:19               ` [U-Boot] " Wolfgang Denk
2008-08-11 12:31                 ` Haavard Skinnemoen
2008-08-11 12:53                   ` Mark Jackson
2008-08-11 13:13                     ` Haavard Skinnemoen

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