mount.cifs: clean up option parsing
authorScott Lovenberg <scott.lovenberg@gmail.com>
Fri, 14 May 2010 23:32:05 +0000 (19:32 -0400)
committerJeff Layton <jlayton@samba.org>
Fri, 14 May 2010 19:35:19 +0000 (15:35 -0400)
commit268079992cf85bfb9954b6fd4abb3eebf911a9d3
tree56d29b349adff8bd0aa5b179105b4515707d04ae
parent2fcf89a2077d3ddf203b73d72985aa68c6402693
mount.cifs: clean up option parsing

Moved option string parsing to function parse_opt_token(char*).  Main
loop in parse_options(const char*, struct parsed_mount_info*)
transplanted to a switch block.

The parsing function folds common options to a single macro:
1.) 'unc','target', and 'path' -> 'OPT_UNC'
2.) 'dom*' and 'workg*' -> 'OPT_DOM'
3.) 'nobrl' and 'nolock' -> 'OPT_NO_LOCK'

Kept 'fmask' and 'dmask' (OPT_FMASK, OPT_DMASK), which fall through to
'file_mode' and 'dir_mode' in the main loop.

Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com>
mount.cifs.c