Added special option -t all

This commit is contained in:
XMRig 2017-10-06 23:44:25 +03:00
parent b43d986537
commit 8729616698

View file

@ -363,7 +363,6 @@ bool Options::parseArg(int key, const char *arg)
case 'r': /* --retries */ case 'r': /* --retries */
case 'R': /* --retry-pause */ case 'R': /* --retry-pause */
case 't': /* --threads */
case 'v': /* --av */ case 'v': /* --av */
case 1003: /* --donate-level */ case 1003: /* --donate-level */
case 1004: /* --max-cpu-usage */ case 1004: /* --max-cpu-usage */
@ -383,6 +382,14 @@ bool Options::parseArg(int key, const char *arg)
case 1009: /* --no-huge-pages */ case 1009: /* --no-huge-pages */
return parseBoolean(key, false); return parseBoolean(key, false);
case 't': /* --threads */
if (strncmp(arg, "all", 3) == 0) {
m_threads = Cpu::threads();
return true;
}
return parseArg(key, strtol(arg, nullptr, 10));
case 'V': /* --version */ case 'V': /* --version */
showVersion(); showVersion();
return false; return false;