From 51b1d76607bc2d0e127408898c5c44ab1480bf7d Mon Sep 17 00:00:00 2001 From: Yan Jun Date: Sat, 25 Jun 2016 13:35:38 +0800 Subject: [PATCH] rgw/rgw_admin.cc: fix some indent and replace 'tab' with spaces Signed-off-by: Yan Jun --- src/rgw/rgw_main.cc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 7339c7a581f51..6dc3e0c288213 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -80,7 +80,7 @@ void signal_shutdown() if (ret < 0) { int err = -errno; derr << "ERROR: " << __func__ << ": write() returned " - << cpp_strerror(-err) << dendl; + << cpp_strerror(-err) << dendl; } } } @@ -200,7 +200,7 @@ int main(int argc, const char **argv) if (TEMP_FAILURE_RETRY(dup2(STDOUT_FILENO, STDERR_FILENO) < 0)) { int err = errno; cout << "failed to redirect stderr to stdout: " << cpp_strerror(err) - << std::endl; + << std::endl; return ENOSYS; } @@ -216,7 +216,7 @@ int main(int argc, const char **argv) // First, let's determine which frontends are configured. int flags = CINIT_FLAG_UNPRIVILEGED_DAEMON_DEFAULTS; global_pre_init(&def_args, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_DAEMON, - flags); + flags); list frontends; get_str_list(g_conf->rgw_frontends, ",", frontends); @@ -233,11 +233,13 @@ int main(int argc, const char **argv) // dropping permissions by setting the appropriate flag. flags |= CINIT_FLAG_DEFER_DROP_PRIVILEGES; if (f.find("port") != string::npos) { - // check for the most common ws problems - if ((f.find("port=") == string::npos) || - (f.find("port= ") != string::npos)) { - derr << "WARNING: civetweb frontend config found unexpected spacing around 'port' (ensure civetweb port parameter has the form 'port=80' with no spaces before or after '=')" << dendl; - } + // check for the most common ws problems + if ((f.find("port=") == string::npos) || + (f.find("port= ") != string::npos)) { + derr << "WARNING: civetweb frontend config found unexpected spacing around 'port' " + << "(ensure civetweb port parameter has the form 'port=80' with no spaces " + << "before or after '=')" << dendl; + } } } @@ -258,7 +260,7 @@ int main(int argc, const char **argv) // initialization. Passing false as the final argument ensures that // global_pre_init() is not invoked twice. global_init(&def_args, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_DAEMON, - flags, "rgw_data", false); + flags, "rgw_data", false); for (std::vector::iterator i = args.begin(); i != args.end(); ++i) { if (ceph_argparse_flag(args, i, "-h", "--help", (char*)NULL)) { @@ -342,12 +344,12 @@ int main(int argc, const char **argv) if (apis_map.count("swift") > 0) { rest.register_resource(g_conf->rgw_swift_url_prefix, - set_logging(new RGWRESTMgr_SWIFT)); + set_logging(new RGWRESTMgr_SWIFT)); } if (apis_map.count("swift_auth") > 0) rest.register_resource(g_conf->rgw_swift_auth_entry, - set_logging(new RGWRESTMgr_SWIFT_Auth)); + set_logging(new RGWRESTMgr_SWIFT_Auth)); if (apis_map.count("admin") > 0) { RGWRESTMgr_Admin *admin_resource = new RGWRESTMgr_Admin; -- 2.39.5