From: Kees Cook <keescook@chromium.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Landley <rob@landley.net>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, linux-doc@vger.kernel.org,
linux-serial@vger.kernel.org, Kees Cook <keescook@chromium.org>
Subject: [PATCH 3/3] printk: report boot console names during cut-over
Date: Fri, 12 Jul 2013 13:07:40 -0700 [thread overview]
Message-ID: <1373659660-31123-3-git-send-email-keescook@chromium.org> (raw)
In-Reply-To: <1373659660-31123-1-git-send-email-keescook@chromium.org>
This reports the names of boot consoles as they're being disabled to
help identify which is which during cut-over. Helps answer the question
"which boot console actually got activated?"
Signed-off-by: Kees Cook <keescook@chromium.org>
---
kernel/printk.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/kernel/printk.c b/kernel/printk.c
index d37d45c..08612e0 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -2375,14 +2375,18 @@ void register_console(struct console *newcon)
if (bcon &&
((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV) &&
!keep_bootcon) {
- /* we need to iterate through twice, to make sure we print
- * everything out, before we unregister the console(s)
+ /* We need to iterate through all boot consoles, to make
+ * sure we print everything out, before we unregister them.
*/
- printk(KERN_INFO "console [%s%d] enabled, bootconsole disabled\n",
- newcon->name, newcon->index);
- for_each_console(bcon)
- if (bcon->flags & CON_BOOT)
+ for_each_console(bcon) {
+ if (bcon->flags & CON_BOOT) {
+ printk(KERN_INFO "console [%s%d] enabled, "
+ "bootconsole [%s%d] disabled\n",
+ newcon->name, newcon->index,
+ bcon->name, bcon->index);
unregister_console(bcon);
+ }
+ }
} else {
printk(KERN_INFO "%sconsole [%s%d] enabled\n",
(newcon->flags & CON_BOOT) ? "boot" : "" ,
--
1.7.9.5
next prev parent reply other threads:[~2013-07-12 20:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-12 20:07 [PATCH 1/3] x86, boot: add mmio serial during compressed boot Kees Cook
2013-07-12 20:07 ` [PATCH 2/3] serial: report base_baud after initialization Kees Cook
2013-07-12 20:07 ` Kees Cook [this message]
[not found] ` <CAGXu5jL=oSkWTGEbYLxAU1PwGbgoyeiOgFV31Gd4yj1JkDECBg@mail.gmail.com>
2013-07-12 20:17 ` [PATCH 1/3] x86, boot: add mmio serial during compressed boot Kees Cook
2013-07-12 20:20 ` H. Peter Anvin
2013-07-12 20:38 ` [PATCH v2 " Kees Cook
2013-07-13 6:47 ` Yinghai Lu
2013-07-13 14:53 ` H. Peter Anvin
2013-07-13 21:56 ` Yinghai Lu
2013-07-13 22:33 ` H. Peter Anvin
2013-07-16 19:31 ` Kees Cook
2013-07-16 19:36 ` H. Peter Anvin
2013-07-16 19:40 ` Kees Cook
2013-07-16 19:41 ` H. Peter Anvin
2013-07-16 21:59 ` Yinghai Lu
2013-07-16 21:03 ` Yinghai Lu
2013-07-16 22:05 ` H. Peter Anvin
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=1373659660-31123-3-git-send-email-keescook@chromium.org \
--to=keescook@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rob@landley.net \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®