Re: [PATCH 1/2] connect.c: define mount options enum and parsing function
Scott Lovenberg <[email protected]> Wed, 19 May 2010 08:37:30 -0400
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
On Tue, May 18, 2010 at 6:17 AM, Jeff Layton <[email protected]> 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. _______________________________________________ linux-cifs-client mailing list [email protected] https://lists.samba.org/mailman/listinfo/linux-cifs-client