]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: check result of rgw_tools_init
authorYan Jun <yan.jun8@zte.com.cn>
Mon, 20 Jun 2016 06:37:23 +0000 (14:37 +0800)
committerYan Jun <yan.jun8@zte.com.cn>
Mon, 20 Jun 2016 06:37:23 +0000 (14:37 +0800)
Maybe we should handle the error return code

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
src/rgw/rgw_main.cc

index 7339c7a581f510317280a6ae7e5286c127f82a09..ef8f7f762ae1f1f6c8067b0bdb0293fcdcf70662 100644 (file)
@@ -287,7 +287,11 @@ int main(int argc, const char **argv)
   // claim the reference and release it after subsequent destructors have fired
   boost::intrusive_ptr<CephContext> cct(g_ceph_context, false);
 
-  rgw_tools_init(g_ceph_context);
+  int r = rgw_tools_init(g_ceph_context);
+  if (r < 0) {
+    derr << "ERROR: unable to initialize rgw tools" << dendl;
+    return -r;
+  }
 
   rgw_init_resolver();
   
@@ -295,7 +299,6 @@ int main(int argc, const char **argv)
   
   FCGX_Init();
 
-  int r = 0;
   RGWRados *store = RGWStoreManager::get_storage(g_ceph_context,
       g_conf->rgw_enable_gc_threads, g_conf->rgw_enable_quota_threads,
       g_conf->rgw_run_sync_thread);