mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
move CmdLine cmdLine into its own file in prep for other command line work
This commit is contained in:
parent
ea9cdf79a0
commit
0cbd5b6a37
@ -359,7 +359,7 @@ if GetOption( "extralib" ) is not None:
|
||||
|
||||
# ------ SOURCE FILE SETUP -----------
|
||||
|
||||
commonFiles = Split( "stdafx.cpp buildinfo.cpp db/common.cpp db/jsobj.cpp db/json.cpp db/lasterror.cpp db/nonce.cpp db/queryutil.cpp shell/mongo.cpp" )
|
||||
commonFiles = Split( "stdafx.cpp buildinfo.cpp db/common.cpp db/jsobj.cpp db/json.cpp db/lasterror.cpp db/nonce.cpp db/queryutil.cpp db/cmdline.cpp shell/mongo.cpp" )
|
||||
commonFiles += [ "util/background.cpp" , "util/mmap.cpp" , "util/sock.cpp" , "util/util.cpp" , "util/message.cpp" ,
|
||||
"util/assert_util.cpp" , "util/httpclient.cpp" , "util/md5main.cpp" , "util/base64.cpp", "util/debug_util.cpp",
|
||||
"util/thread_pool.cpp" ]
|
||||
|
@ -22,8 +22,6 @@
|
||||
|
||||
namespace mongo {
|
||||
|
||||
CmdLine cmdLine;
|
||||
|
||||
const char * curNs = "in client mode";
|
||||
|
||||
bool dbexitCalled = false;
|
||||
|
23
db/cmdline.cpp
Normal file
23
db/cmdline.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
// cmdline.cpp
|
||||
|
||||
#include "cmdline.h"
|
||||
|
||||
/**
|
||||
* Copyright (C) 2008 10gen 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,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace mongo {
|
||||
CmdLine cmdLine;
|
||||
}
|
@ -16,6 +16,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../stdafx.h"
|
||||
|
||||
namespace mongo {
|
||||
|
||||
/* command line options
|
||||
@ -51,8 +53,12 @@ namespace mongo {
|
||||
port(DefaultDBPort), rest(false), quiet(false), notablescan(false), prealloc(true), smallfiles(false),
|
||||
quota(false), quotaFiles(8), cpu(false), oplogSize(0), defaultProfile(0), slowMS(100)
|
||||
{ }
|
||||
|
||||
|
||||
void addGlobalOptions( boost::program_options::options_description& general ,
|
||||
boost::program_options::options_description& hidden );
|
||||
};
|
||||
|
||||
|
||||
extern CmdLine cmdLine;
|
||||
|
||||
}
|
||||
|
@ -46,8 +46,6 @@ namespace mongo {
|
||||
void receivedInsert(Message& m, CurOp& op);
|
||||
bool receivedGetMore(DbResponse& dbresponse, Message& m, CurOp& curop );
|
||||
|
||||
CmdLine cmdLine;
|
||||
|
||||
int nloggedsome = 0;
|
||||
#define LOGSOME if( ++nloggedsome < 1000 || nloggedsome % 100 == 0 )
|
||||
|
||||
|
@ -33,7 +33,6 @@ namespace mongo {
|
||||
string ourHostname;
|
||||
OID serverID;
|
||||
bool dbexitCalled = false;
|
||||
CmdLine cmdLine;
|
||||
|
||||
bool inShutdown(){
|
||||
return dbexitCalled;
|
||||
|
Loading…
Reference in New Issue
Block a user