diff options
author | Jeff Layton <jlayton@samba.org> | 2012-10-29 15:45:37 -0400 |
---|---|---|
committer | Jeff Layton <jlayton@samba.org> | 2012-10-29 15:45:37 -0400 |
commit | d9b876bc5b047682854123aed082c1004b995b69 (patch) | |
tree | 65efaca1db5d0174c2ed3df02e78b67d85b1668c | |
parent | 1a0523fbc469e34560bec0f06ce4622bb7db7b04 (diff) | |
download | cifs-utils-d9b876bc5b047682854123aed082c1004b995b69.tar.gz cifs-utils-d9b876bc5b047682854123aed082c1004b995b69.tar.bz2 cifs-utils-d9b876bc5b047682854123aed082c1004b995b69.zip |
cifs.idmap: add an options struct to handle long options
...since the manpage advertises them.
Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Jeff Layton <jlayton@samba.org>
-rw-r--r-- | cifs.idmap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cifs.idmap.c b/cifs.idmap.c index bfef58b..ea22300 100644 --- a/cifs.idmap.c +++ b/cifs.idmap.c @@ -44,6 +44,11 @@ static const char *prog = "cifs.idmap"; +static const struct option long_options[] = { + {"version", 0, NULL, 'v'}, + {NULL, 0, NULL, 0} +}; + static void usage(void) { fprintf(stderr, "Usage: %s key_serial\n", prog); @@ -189,7 +194,7 @@ int main(const int argc, char *const argv[]) openlog(prog, 0, LOG_DAEMON); - while ((c = getopt_long(argc, argv, "v", NULL, NULL)) != -1) { + while ((c = getopt_long(argc, argv, "v", long_options, NULL)) != -1) { switch (c) { case 'v': printf("version: %s\n", VERSION); |