All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven A. Falco <sfalco@harris.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Silent console enhancement patch
Date: Thu, 12 Jun 2008 13:39:29 -0400	[thread overview]
Message-ID: <48515F51.5030504@harris.com> (raw)


The silent console as currently implemented is not silent if a board has been
newly manufactured.  I.e., some messages are printed prior to being able to set
the "silent" environment variable the first time.

The following patch adds a new configuration option,
CONFIG_VERY_SILENT_CONSOLE, which modifies the behavior slightly.  If this
option is selected, then the absence of the "silent" variable will result in
a default behavior of "silent".  Also, if "silent" is set to "1", then the
behavior will be "silent".  Only if a different value, say "0", is selected
will the behavior be "verbose".

This patch doesn't change the behavior for any existing BSP's because they will
not have selected the CONFIG_VERY_SILENT_CONSOLE option.

Signed-off-by: Steve Falco <sfalco@harris.com>

diff --git a/common/console.c b/common/console.c
index d8a0cb6..4c98eef 100644
--- a/common/console.c
+++ b/common/console.c
@@ -361,12 +361,22 @@ int console_assign (int file, char *devname)
 /* Called before relocation - use serial functions */
 int console_init_f (void)
 {
+#ifdef CONFIG_VERY_SILENT_CONSOLE
+	char *pSilent;
+#endif
+
 	gd->have_console = 1;
 
 #ifdef CONFIG_SILENT_CONSOLE
+#ifdef CONFIG_VERY_SILENT_CONSOLE
+	pSilent = getenv("silent");
+	if(!pSilent || *pSilent == '1')
+		gd->flags |= GD_FLG_SILENT;
+#else
 	if (getenv("silent") != NULL)
 		gd->flags |= GD_FLG_SILENT;
 #endif
+#endif
 
 	return (0);
 }

             reply	other threads:[~2008-06-12 17:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-12 17:39 Steven A. Falco [this message]
2008-06-13  6:41 ` [U-Boot-Users] Silent console enhancement patch Wolfgang Denk
2008-06-13 13:34   ` Steven A. Falco
2008-06-14 21:48     ` Wolfgang Denk
2008-06-16 16:45       ` Steven A. Falco
2008-06-17  4:17         ` Wolfgang Denk

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=48515F51.5030504@harris.com \
    --to=sfalco@harris.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.