[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100317055707.5013.72217.sendpatchset@localhost.localdomain>
Date: Wed, 17 Mar 2010 01:53:26 -0400
From: Amerigo Wang <amwang@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: netdev@...r.kernel.org, Amerigo Wang <amwang@...hat.com>,
David Miller <davem@...emloft.net>
Subject: [Patch] netpoll: allow spaces in its parameter
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@....168.0.2/".
Signed-off-by: WANG Cong <amwang@...hat.com>
Cc: David Miller <davem@...emloft.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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists