Added new --calibrate-algo and --save-config command line options

This commit is contained in:
MoneroOcean 2018-07-18 16:13:54 +02:00
parent 08e791b60d
commit 70ce04b44c
4 changed files with 24 additions and 0 deletions

View file

@ -6,6 +6,7 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018 MoneroOcean <https://github.com/MoneroOcean>, <support@moneroocean.stream>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -183,6 +184,14 @@ bool xmrig::CommonConfig::parseBoolean(int key, bool enable)
m_dryRun = enable;
break;
case IConfig::CalibrateAlgoKey: /* --calibrate-algo */
m_calibrateAlgo = enable;
break;
case IConfig::SaveConfigKey: /* --save-config */
m_saveConfig = enable;
break;
default:
break;
}
@ -267,6 +276,8 @@ bool xmrig::CommonConfig::parseString(int key, const char *arg)
case NicehashKey: /* --nicehash */
case ApiIPv6Key: /* --api-ipv6 */
case DryRunKey: /* --dry-run */
case CalibrateAlgoKey: /* --calibrate-algo */
case SaveConfigKey: /* --save-config */
return parseBoolean(key, true);
case ColorKey: /* --no-color */

View file

@ -6,6 +6,7 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018 MoneroOcean <https://github.com/MoneroOcean>, <support@moneroocean.stream>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -48,6 +49,8 @@ public:
inline bool isBackground() const { return m_background; }
inline bool isColors() const { return m_colors; }
inline bool isDryRun() const { return m_dryRun; }
inline bool isCalibrateAlgo() const { return m_calibrateAlgo; }
inline bool isSaveConfig() const { return m_saveConfig; }
inline bool isSyslog() const { return m_syslog; }
inline const char *apiToken() const { return m_apiToken.data(); }
inline const char *apiWorkerId() const { return m_apiWorkerId.data(); }
@ -87,6 +90,8 @@ protected:
bool m_background;
bool m_colors;
bool m_dryRun;
bool m_calibrateAlgo;
bool m_saveConfig;
bool m_syslog;
bool m_watch;
int m_apiPort;

View file

@ -5,6 +5,7 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2016-2018 XMRig <support@xmrig.com>
* Copyright 2018 MoneroOcean <https://github.com/MoneroOcean>, <support@moneroocean.stream>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -67,6 +68,8 @@ public:
CPUPriorityKey = 1021,
NicehashKey = 1006,
PrintTimeKey = 1007,
CalibrateAlgoKey = 10001,
SaveConfigKey = 10002,
// xmrig cpu
AVKey = 'v',