[linux-cifs-client] [PATCH 1/2] connect.c: define mount options enum and parsing function

Scott Lovenberg scott.lovenberg at gmail.com
Wed May 19 06:37:30 MDT 2010


On Tue, May 18, 2010 at 6:17 AM, Jeff Layton <jlayton at samba.org> wrote:

>
> There's really no need to assign every value on an enum. You should
> also probably prefix these with the semi-standard "Opt_" so that they
> aren't confused with other values. This should also be static, I think.
>
> Agreed on Opt prefix.  I only used the enum as it was the preferred way to
define related constants in the kernel coding style; TBH, I'd rather just
use #define'd constants.  If it's all the same, that's what I'll do.  It
means I won't have to fight with keeping the alignment in vim the same as
what gets emailed (those values were all aligned in the file and the patch
file). :)


> This looks like a step in the right direction, but I'll note that the
> kernel already has a standard mount option parser. See match_token().
> For an example of how it's used, you can look at the NFS code, starting
> with nfs_parse_mount_options.
>
> Aha!

It would be best to move to that code if possible
>
Agreed.


-- 
Peace and Blessings,
-Scott.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/linux-cifs-client/attachments/20100519/f6ff4d47/attachment-0001.html>


More information about the linux-cifs-client mailing list