]> git.sur5r.net Git - openldap/commitdiff
ITS#7465 fail if both -a and -s specified
authorHoward Chu <hyc@symas.com>
Fri, 7 Dec 2012 20:06:30 +0000 (12:06 -0800)
committerHoward Chu <hyc@symas.com>
Fri, 7 Dec 2012 20:06:30 +0000 (12:06 -0800)
libraries/liblmdb/mdb_stat.c

index 4dfcf49645c15e4466ac74f0ab5d3a189ee82941..e9981f60161416bd71f781efaa973079e7620b2c 100644 (file)
@@ -62,6 +62,8 @@ int main(int argc, char *argv[])
        while ((i = getopt(argc, argv, "aefns:")) != EOF) {
                switch(i) {
                case 'a':
+                       if (subname)
+                               usage(prog);
                        alldbs++;
                        break;
                case 'e':
@@ -74,6 +76,8 @@ int main(int argc, char *argv[])
                        envflags |= MDB_NOSUBDIR;
                        break;
                case 's':
+                       if (alldbs)
+                               usage(prog);
                        subname = optarg;
                        break;
                default: