diff options
author | Jeff Garzik <jgarzik@exmulti.com> | 2012-05-23 23:10:59 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-05-23 23:10:59 -0400 |
commit | 429039d45d1af9cfda9e706d4ac8f1a144ed66d4 (patch) | |
tree | c04ac16d98ff31e50b4023cdbc9e9899651e2093 /src | |
parent | 8956453c0d4f5cff3186e1c9a8e6d8d74e3c7445 (diff) |
Refactor: move runCommand() to util.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 8 | ||||
-rw-r--r-- | src/util.cpp | 8 | ||||
-rw-r--r-- | src/util.h | 1 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9a4d7abc8c..9e20ca6261 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1501,14 +1501,6 @@ bool static Reorganize(CTxDB& txdb, CBlockIndex* pindexNew) } -static void -runCommand(std::string strCommand) -{ - int nErr = ::system(strCommand.c_str()); - if (nErr) - printf("runCommand error: system(%s) returned %d\n", strCommand.c_str(), nErr); -} - // Called from inside SetBestChain: attaches a block to the new best chain being built bool CBlock::SetBestChainInner(CTxDB& txdb, CBlockIndex *pindexNew) { diff --git a/src/util.cpp b/src/util.cpp index 08e3625b3d..3ab30baff6 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1079,3 +1079,11 @@ boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate) return fs::path(""); } #endif + +void runCommand(std::string strCommand) +{ + int nErr = ::system(strCommand.c_str()); + if (nErr) + printf("runCommand error: system(%s) returned %d\n", strCommand.c_str(), nErr); +} + diff --git a/src/util.h b/src/util.h index 5b58147ce6..c1c91bdbc9 100644 --- a/src/util.h +++ b/src/util.h @@ -171,6 +171,7 @@ int64 GetAdjustedTime(); std::string FormatFullVersion(); std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments); void AddTimeData(const CNetAddr& ip, int64 nTime); +void runCommand(std::string strCommand); |