]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/ceph_mgr.cc
update sources to v12.1.0
[ceph.git] / ceph / src / ceph_mgr.cc
index c3fcc276c79a824e8548f4acc9d3e241d3ca66e3..051bed7094647f808f1a9a3a20e8724d5f1fdd3f 100644 (file)
 
 #include "mgr/MgrStandby.h"
 
+static void usage()
+{
+  cout << "usage: ceph-mgr -i <ID> [flags]\n"
+       << std::endl;
+  generic_server_usage();
+}
 
 /**
  * A short main() which just instantiates a MgrStandby and
@@ -43,16 +49,14 @@ int main(int argc, const char **argv)
 
   // Handle --help
   if ((args.size() == 1 && (std::string(args[0]) == "--help" || std::string(args[0]) == "-h"))) {
-    MgrStandby mgr;
-    mgr.usage();
-    return 0;
+    usage();
   }
 
   global_init_daemonize(g_ceph_context);
   global_init_chdir(g_ceph_context);
   common_init_finish(g_ceph_context);
 
-  MgrStandby mgr;
+  MgrStandby mgr(argc, argv);
   int rc = mgr.init();
   if (rc != 0) {
       std::cerr << "Error in initialization: " << cpp_strerror(rc) << std::endl;