<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><br></div></div>
There's really no need to assign every value on an enum. You should<br>
also probably prefix these with the semi-standard "Opt_" so that they<br>
aren't confused with other values. This should also be static, I think.<br>
<div><div></div><div><br></div></div></blockquote></div><div>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). :)</div>
</div></blockquote><div> </div><div>Sorry, I just realized what you were saying about assigning in the enum. Disregard the comment above (this is why I should have a cup of coffee before replying to email, not during). </div>
<div>Unfortunately GCC throws warnings if I make the enums static.</div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote">
<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For an example of how it's used, you can look at the NFS code, starting<br>
with nfs_parse_mount_options.<br>
<br></blockquote></div><div>Aha! </div><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It would be best to move to that code if possible<font color="#888888"><br></font></blockquote></div><div>Agreed. </div><div></div></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div> </div></div></blockquote><div>After looking at the NFS code, I scrapped what I had and rewrote to follow the style/semantics of the NFS option parsing. I think this patch will be more in line with what you had in mind. </div>
<div>I left the value parsing as it was and used the match_token to get the current token. I'll follow up with another patch if you'd like me to implement grabbing the value with the parser lib instead of what we've got currently.</div>
</div><br>-- <br>Peace and Blessings,<br>-Scott.<br><br>