Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:51600 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751308AbcBCL6r (ORCPT ); Wed, 3 Feb 2016 06:58:47 -0500 Date: Wed, 3 Feb 2016 06:58:44 -0500 (EST) From: Benjamin Coddington To: Steve Dickson cc: Malahal Naineni , linux-nfs@vger.kernel.org, "J. Bruce Fields" Subject: Re: [PATCH] Ignore whitespace at the beginning of option tags In-Reply-To: <56B0CA44.40105@RedHat.com> Message-ID: References: <1454020727-1814-1-git-send-email-malahal@us.ibm.com> <56B0CA44.40105@RedHat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-nfs-owner@vger.kernel.org List-ID: On Tue, 2 Feb 2016, Steve Dickson wrote: > > On 01/28/2016 05:38 PM, Malahal Naineni wrote: > > The following should work now: > > > > [General] > > Domain = local.domain.edu > > > > Signed-off-by: Malahal Naineni > > --- > > cfg.c | 9 ++++++++- > Ok.. I give... :-) What is this patch relative to? There is > a conf_parse_line() in support/nfs/conffile.c but there > is no cfg.c file in nfs-utils... and this patch does > not apply... This is for libnfsidap.. cc-ing Bruce. Ben > > 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; > > } > > > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >