setcifsacl: fix up getopt() usage
authorJeff Layton <jlayton@samba.org>
Wed, 7 Nov 2012 15:19:15 +0000 (10:19 -0500)
committerJeff Layton <jlayton@samba.org>
Wed, 7 Nov 2012 15:19:15 +0000 (10:19 -0500)
commit7b3796695ec4b2afe2feb05678be8f8a6b64044c
treef28193d566a81b47df9b09efbb341840ba3d7f40
parentb578467bf04f0290ab3bcaa82ef007d9f39f186b
setcifsacl: fix up getopt() usage

'?' has a special meaning in getopt(). It means that the option
character was not recognized. You can override that behavior by making
':' the first character of the optstring, but that wasn't done here. I'm
not sure what the effect of having '?' in the actual optstring is in
this case, but it's probably best not to put it in there.

Remove '?' from the optstring and replace it 'h'. Also add '-h' as a
valid option to the manpage.

'-v' doesn't require an argument, so fix the optstring to reflect that.

Finally declare a new variable to hold optarg. Currently we only call
getopt() once, which is a little odd. Eventually we may want to make it
call it more than once, in which case we'll need some way to store the
optarg on each pass.

Signed-off-by: Jeff Layton <jlayton@samba.org>
setcifsacl.1
setcifsacl.c