public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mark Jackson <mpfj@mimc.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Allow console input to be disabled
Date: Wed, 30 Jul 2008 13:17:43 +0100	[thread overview]
Message-ID: <48905BE7.1060402@mimc.co.uk> (raw)

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);

             reply	other threads:[~2008-07-30 12:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30 12:17 Mark Jackson [this message]
2008-08-07 10:27 ` [U-Boot-Users] [PATCH] Allow console input to be disabled 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48905BE7.1060402@mimc.co.uk \
    --to=mpfj@mimc.co.uk \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox