From: Doug Anderson <dianders@chromium.org>
To: Jason Wessel <jason.wessel@windriver.com>
Cc: Doug Anderson <dianders@chromium.org>,
kgdb-bugreport@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: [PATCH] kdb: Put a cr before lf when working w/ a non open console port
Date: Fri, 18 Apr 2014 10:17:28 -0700 [thread overview]
Message-ID: <1397841448-12942-1-git-send-email-dianders@chromium.org> (raw)
In (efe2f29 kgdboc,kdb: Allow kdb to work on a non open console port)
support was added to directly use the "write_char" functions when
doing kdb over a non-open console port. This is great, but it ends up
bypassing the normal code in uart_console_write() that adds a carriage
return before any newlines.
Add similar code in kdb so we don't get things like:
[0]kdb>
[0]kdb>
[0]kdb>
Signed-off-by: Doug Anderson <dianders@chromium.org>
---
kernel/debug/kdb/kdb_io.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c
index 14ff484..513ed44 100644
--- a/kernel/debug/kdb/kdb_io.c
+++ b/kernel/debug/kdb/kdb_io.c
@@ -698,6 +698,9 @@ kdb_printit:
len = retlen;
cp = kdb_buffer;
while (len--) {
+ if (*cp == '\n')
+ dbg_io_ops->write_char('\r');
+
dbg_io_ops->write_char(*cp);
cp++;
}
@@ -759,6 +762,9 @@ kdb_printit:
len = strlen(moreprompt);
cp = moreprompt;
while (len--) {
+ if (*cp == '\n')
+ dbg_io_ops->write_char('\r');
+
dbg_io_ops->write_char(*cp);
cp++;
}
--
1.9.1.423.g4596e3a
next reply other threads:[~2014-04-18 17:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-18 17:17 Doug Anderson [this message]
2014-04-18 23:53 ` Doug Anderson
2014-04-21 17:06 ` [PATCH v2] serial_core: Commonalize crlf " Doug Anderson
2014-04-22 9:55 ` One Thousand Gnomes
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=1397841448-12942-1-git-send-email-dianders@chromium.org \
--to=dianders@chromium.org \
--cc=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.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®