From: Amerigo Wang <amwang@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, Amerigo Wang <amwang@redhat.com>,
David Miller <davem@davemloft.net>
Subject: [Patch] netpoll: allow spaces in its parameter
Date: Wed, 17 Mar 2010 01:53:26 -0400 [thread overview]
Message-ID: <20100317055707.5013.72217.sendpatchset@localhost.localdomain> (raw)
It would be nice if we allow spaces in netconsole parameters,
otherwise we get weird results if there are spaces in it.
After this patch, we will allow things like:
"netconsole= @192.168.0.1/eth0 , 66666@192.168.0.2/".
Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: David Miller <davem@davemloft.net>
---
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 7aa6972..bf3b2f0 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -629,6 +629,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
char *cur=opt, *delim;
if (*cur != '@') {
+ cur = skip_spaces(cur);
if ((delim = strchr(cur, '@')) == NULL)
goto parse_failed;
*delim = 0;
@@ -651,12 +652,14 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
if ((delim = strchr(cur, ',')) == NULL)
goto parse_failed;
*delim = 0;
+ strim(cur);
strlcpy(np->dev_name, cur, sizeof(np->dev_name));
cur = delim;
}
cur++;
if (*cur != '@') {
+ cur = skip_spaces(cur);
/* dst port */
if ((delim = strchr(cur, '@')) == NULL)
goto parse_failed;
next reply other threads:[~2010-03-17 5:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 5:53 Amerigo Wang [this message]
2010-03-17 5:54 ` [Patch] netpoll: allow spaces in its parameter David Miller
2010-03-17 6:01 ` Cong Wang
2010-03-17 5:59 ` David Miller
2010-03-17 6:07 ` Cong Wang
2010-03-17 6:14 ` David Miller
2010-03-17 6:38 ` Cong Wang
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=20100317055707.5013.72217.sendpatchset@localhost.localdomain \
--to=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).