All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Karel Zak <kzak@redhat.com>
Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 08/13] NFS: Add functions to parse nfs mount options to fs/nfs/super.c
Date: Tue, 29 May 2007 17:08:01 -0400	[thread overview]
Message-ID: <465C9631.1070300@oracle.com> (raw)
In-Reply-To: <20070529202123.GA5473@petra.dvoda.cz>

[-- Attachment #1: Type: text/plain, Size: 1115 bytes --]

Karel Zak wrote:
> On Mon, May 21, 2007 at 12:09:54PM -0400, Chuck Lever wrote:
>> For NFSv2 and NFSv3 mount options.
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> 
>  ....
> 
>> +static int nfs_parse_options(char *raw, struct nfs_mount_args *mnt)
>> +{
>> +	char *p, *string;
>> +
>> +	if (!raw) {
>> +		dprintk("NFS: mount options string was NULL.\n");
>> +		return 1;
>> +	}
>> +
>> +	while ((p = strsep (&raw, ",")) != NULL) {
>> +		substring_t args[MAX_OPT_ARGS];
>> +		int option, token;
>> +
>> +		if (!*p)
>> +			continue;
>> +		token = match_token(p, nfs_tokens, args);
> 
>  ....
> 
>> +
>> +		case Opt_context:
>> +			match_strcpy(mnt->nmd.context, args);
>> +			break;
> 
>  The userspace version (nfs-utils) of this code supports a quoted
>  context strings. For example:
> 
>     context="aaa,bbb,ccc",hard
> 
>  It seems your code blindly parses a raw option string by ",".

Karel-

I've never used the context= option, and didn't find any documentation 
describing how it was used.

Is there a clean example of how to use the in-kernel parser to handle 
quoted strings containing commas?

[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 291 bytes --]

begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
url:http://oss.oracle.com/~cel/
version:2.1
end:vcard


  reply	other threads:[~2007-05-29 21:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-21 16:09 [PATCH 08/13] NFS: Add functions to parse nfs mount options to fs/nfs/super.c Chuck Lever
2007-05-29 20:21 ` Karel Zak
2007-05-29 21:08   ` Chuck Lever [this message]
2007-05-30  0:18     ` Karel Zak

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=465C9631.1070300@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=kzak@redhat.com \
    --cc=linux-fsdevel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.