linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Ignore whitespace at the beginning of option tags
@ 2016-01-28 22:38 Malahal Naineni
  2016-02-02 15:24 ` Steve Dickson
  0 siblings, 1 reply; 7+ messages in thread
From: Malahal Naineni @ 2016-01-28 22:38 UTC (permalink / raw)
  To: linux-nfs; +Cc: SteveD, Malahal Naineni

The following should work now:

[General]
	Domain = local.domain.edu

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
---
 cfg.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/cfg.c b/cfg.c
index c615d24..e0ab839 100644
--- a/cfg.c
+++ b/cfg.c
@@ -210,6 +210,7 @@ static void
 conf_parse_line (int trans, char *line, size_t sz)
 {
   char *val;
+  char *tag;
   size_t i;
   int j;
   static char *section = 0;
@@ -262,8 +263,14 @@ conf_parse_line (int trans, char *line, size_t sz)
 	/* Skip trailing whitespace, if any */
 	for (j = sz - (val - line) - 1; j > 0 && isspace (val[j]); j--)
 	  val[j] = '\0';
+
+	/* Skip beginning white space */
+	tag = line;
+	while (isspace(*tag))
+		tag++;
+
 	/* XXX Perhaps should we not ignore errors?  */
-	conf_set (trans, section, line, val, 0, 0);
+	conf_set (trans, section, tag, val, 0, 0);
 	return;
       }
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-11 18:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-28 22:38 [PATCH] Ignore whitespace at the beginning of option tags Malahal Naineni
2016-02-02 15:24 ` Steve Dickson
2016-02-03 11:58   ` Benjamin Coddington
2016-02-04 23:29     ` Malahal Naineni
2016-02-09 16:00       ` Steve Dickson
2016-02-09 16:13         ` J. Bruce Fields
2016-02-11 18:02         ` Malahal Naineni

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).