diff options
Diffstat (limited to 'src/mongo/tools/mongobridge_options_init.cpp')
-rw-r--r-- | src/mongo/tools/mongobridge_options_init.cpp | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/src/mongo/tools/mongobridge_options_init.cpp b/src/mongo/tools/mongobridge_options_init.cpp index 6244235dad1..9878ce9568b 100644 --- a/src/mongo/tools/mongobridge_options_init.cpp +++ b/src/mongo/tools/mongobridge_options_init.cpp @@ -35,30 +35,28 @@ #include "mongo/util/quick_exit.h" namespace mongo { - MONGO_GENERAL_STARTUP_OPTIONS_REGISTER(MongoBridgeOptions)(InitializerContext* context) { - return addMongoBridgeOptions(&moe::startupOptions); - } +MONGO_GENERAL_STARTUP_OPTIONS_REGISTER(MongoBridgeOptions)(InitializerContext* context) { + return addMongoBridgeOptions(&moe::startupOptions); +} - MONGO_STARTUP_OPTIONS_VALIDATE(MongoBridgeOptions)(InitializerContext* context) { - if (!handlePreValidationMongoBridgeOptions(moe::startupOptionsParsed)) { - quickExit(EXIT_SUCCESS); - } - Status ret = moe::startupOptionsParsed.validate(); - if (!ret.isOK()) { - return ret; - } - return Status::OK(); +MONGO_STARTUP_OPTIONS_VALIDATE(MongoBridgeOptions)(InitializerContext* context) { + if (!handlePreValidationMongoBridgeOptions(moe::startupOptionsParsed)) { + quickExit(EXIT_SUCCESS); } - - MONGO_STARTUP_OPTIONS_STORE(MongoBridgeOptions)(InitializerContext* context) { - Status ret = storeMongoBridgeOptions(moe::startupOptionsParsed, context->args()); - if (!ret.isOK()) { - std::cerr << ret.toString() << std::endl; - std::cerr << "try '" << context->args()[0] << " --help' for more information" - << std::endl; - quickExit(EXIT_BADOPTIONS); - } - return Status::OK(); + Status ret = moe::startupOptionsParsed.validate(); + if (!ret.isOK()) { + return ret; } + return Status::OK(); } +MONGO_STARTUP_OPTIONS_STORE(MongoBridgeOptions)(InitializerContext* context) { + Status ret = storeMongoBridgeOptions(moe::startupOptionsParsed, context->args()); + if (!ret.isOK()) { + std::cerr << ret.toString() << std::endl; + std::cerr << "try '" << context->args()[0] << " --help' for more information" << std::endl; + quickExit(EXIT_BADOPTIONS); + } + return Status::OK(); +} +} |