]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: rgw-admin throw an error when invalid flag is passed 495/head
authorChristophe Courtaut <christophe.courtaut@gmail.com>
Mon, 12 Aug 2013 11:55:54 +0000 (13:55 +0200)
committerChristophe Courtaut <christophe.courtaut@gmail.com>
Tue, 13 Aug 2013 11:58:49 +0000 (13:58 +0200)
fix #5820 http://tracker.ceph.com/issues/5820

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
src/rgw/rgw_admin.cc

index 2b8a716115b2ead886a0a83389f6a8ad0924eaf5..8a8b5ecbe30847704c689d769071637d1a6346ed 100644 (file)
@@ -853,6 +853,9 @@ int main(int argc, char **argv)
         cerr << "ERROR: invalid replica log type" << std::endl;
         return EINVAL;
       }
+    } else if (strncmp(*i, "-", 1) == 0) {
+      cerr << "ERROR: invalid flag " << *i << std::endl;
+      return EINVAL;
     } else {
       ++i;
     }