On Mon, May 21, 2007 at 12:09:54PM -0400, Chuck Lever wrote:
> For NFSv2 and NFSv3 mount options.
> Signed-off-by: Chuck Lever <[EMAIL PROTECTED]>

 ....

> +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

-- 
 Karel Zak  <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to