diff options
author | Shaun Verch <shaun.verch@10gen.com> | 2013-12-29 10:14:02 -0800 |
---|---|---|
committer | Shaun Verch <shaun.verch@10gen.com> | 2013-12-30 09:58:37 -0800 |
commit | 67573b22240f455ed425ed040b6f0ac1a7077b74 (patch) | |
tree | ddd120bbb208aa2ae8b15f651f01ee9a533f2bb6 /src/mongo/util/options_parser/startup_options.cpp | |
parent | 44a01e7e4f4e86933ea792c1d110542d66560b6c (diff) | |
download | mongo-67573b22240f455ed425ed040b6f0ac1a7077b74.tar.gz |
SERVER-11940 Separate options parser initialization from options parser utilities
Diffstat (limited to 'src/mongo/util/options_parser/startup_options.cpp')
-rw-r--r-- | src/mongo/util/options_parser/startup_options.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/mongo/util/options_parser/startup_options.cpp b/src/mongo/util/options_parser/startup_options.cpp index 9edc42276d9..f38b6e8b3f3 100644 --- a/src/mongo/util/options_parser/startup_options.cpp +++ b/src/mongo/util/options_parser/startup_options.cpp @@ -1,5 +1,5 @@ -/* - * Copyright (C) 2013 10gen Inc. +/** + * Copyright (C) 2013 MongoDB Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, @@ -28,12 +28,8 @@ #include "mongo/util/options_parser/startup_options.h" -#include "mongo/util/exit_code.h" -#include "mongo/util/options_parser/option_description.h" -#include "mongo/util/options_parser/option_description.h" +#include "mongo/util/options_parser/environment.h" #include "mongo/util/options_parser/option_section.h" -#include "mongo/util/options_parser/options_parser.h" -#include "mongo/util/options_parser/startup_option_init.h" namespace mongo { namespace optionenvironment { @@ -41,19 +37,5 @@ namespace optionenvironment { OptionSection startupOptions("Options"); Environment startupOptionsParsed; -MONGO_STARTUP_OPTIONS_PARSE(StartupOptions)(InitializerContext* context) { - OptionsParser parser; - Status ret = parser.run(startupOptions, context->args(), context->env(), - &startupOptionsParsed); - if (!ret.isOK()) { - std::cerr << ret.reason() << std::endl; - // TODO: Figure out if there's a use case for this help message ever being different - std::cerr << "try '" << context->args()[0] - << " --help' for more information" << std::endl; - ::_exit(EXIT_BADOPTIONS); - } - return Status::OK(); -} - } // namespace optionenvironment } // namespace mongo |