LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org, Jason Wessel <jason.wessel@windriver.com>
Subject: [PATCH 1/7] kgdb-light-v10: fix kgdboc dynamic module configuration
Date: Fri, 15 Feb 2008 14:55:52 -0600 [thread overview]
Message-ID: <1203108958-1818-2-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1203108958-1818-1-git-send-email-jason.wessel@windriver.com>
Fix the run time configuration of kgdboc such that it does not default
to 9600 baud if you use the "echo" command to configure the sysfs
module paramater.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
drivers/serial/kgdboc.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/kgdboc.c b/drivers/serial/kgdboc.c
index 3418307..9cf0332 100644
--- a/drivers/serial/kgdboc.c
+++ b/drivers/serial/kgdboc.c
@@ -106,7 +106,9 @@ static void kgdboc_put_char(u8 chr)
static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp)
{
- if (strlen(kmessage) >= MAX_CONFIG_LEN) {
+ int len = strlen(kmessage);
+
+ if (len >= MAX_CONFIG_LEN) {
printk(KERN_ERR "kgdboc: config string too long\n");
return -ENOSPC;
}
@@ -125,6 +127,9 @@ static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp)
}
strcpy(config, kmessage);
+ /* Chop out \n char as a result of echo */
+ if (config[len - 1] == '\n')
+ config[len - 1] = '\0';
if (configured == 1)
cleanup_kgdboc();
--
1.5.4
next prev parent reply other threads:[~2008-02-15 20:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-15 20:55 [PATCH 0/7] kgdb-light-v10: proposed fixes Jason Wessel
2008-02-15 20:55 ` Jason Wessel [this message]
2008-02-15 20:55 ` [PATCH 2/7] kgdb-light-v10: fix NMI hangs Jason Wessel
2008-02-15 20:55 ` [PATCH 3/7] kgdb-light-v10: clocksource watchdog Jason Wessel
2008-02-15 20:55 ` [PATCH 4/7] kgdb-light-v10: print breakpoint removed on exception Jason Wessel
2008-02-15 20:55 ` [PATCH 5/7] kgdb-light-v10: x86 HW breakpoints Jason Wessel
2008-02-15 20:55 ` [PATCH 6/7] kgdb-light-v10: move the kgdb core and arch implementation Jason Wessel
2008-02-15 20:55 ` [PATCH 7/7] kgdb-light-v10: build core and arch pieces as a kernel module Jason Wessel
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=1203108958-1818-2-git-send-email-jason.wessel@windriver.com \
--to=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--subject='Re: [PATCH 1/7] kgdb-light-v10: fix kgdboc dynamic module configuration' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).