summaryrefslogtreecommitdiffstats
path: root/mmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'mmain.c')
-rw-r--r--mmain.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mmain.c b/mmain.c
index 45c93611..f585992a 100644
--- a/mmain.c
+++ b/mmain.c
@@ -109,7 +109,7 @@ mmain_getopt(struct mmain *p, int argc, char *argv[],
extern int optind;
- sz = strlcpy(opts, "vW:", 32);
+ sz = strlcpy(opts, "VvW:", 32);
assert(sz < 32);
if (u) {
@@ -125,18 +125,21 @@ mmain_getopt(struct mmain *p, int argc, char *argv[],
case ('v'):
p->dbg++;
break;
+ case ('V'):
+ (void)printf("%s %s\n", __progname, VERSION);
+ return(0);
case ('W'):
if ( ! getsopts(p, optarg))
- return(0);
+ return(-1);
break;
case ('?'):
mmain_usage(help);
- return(0);
+ return(-1);
default:
assert(getopt_cb);
if ((*getopt_cb)(arg, c, optarg))
break;
- return(0);
+ return(-1);
}
argv += optind;