diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-09-29 23:05:10 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-09-30 23:46:08 +0200 |
commit | 9e987fc079d243996995e7fac110a3bbc2d7fb1b (patch) | |
tree | 6784426853dcfb98fde4afbc54a582b9da9e3e13 /xmrstak/cli | |
parent | 21463c59c77f463d04a32c9d0a275452452e3f5a (diff) | |
download | xmr-stak-9e987fc079d243996995e7fac110a3bbc2d7fb1b.zip xmr-stak-9e987fc079d243996995e7fac110a3bbc2d7fb1b.tar.gz |
add help message
Diffstat (limited to 'xmrstak/cli')
-rw-r--r-- | xmrstak/cli/cli-miner.cpp | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/xmrstak/cli/cli-miner.cpp b/xmrstak/cli/cli-miner.cpp index 71a1af3..4846d08 100644 --- a/xmrstak/cli/cli-miner.cpp +++ b/xmrstak/cli/cli-miner.cpp @@ -60,8 +60,30 @@ void help() using namespace std; using namespace xmrstak; - cout<<"Usage: "<<params::inst().binaryName<<" [OPTIONS] [CONFIG FILE]"<<endl; - + cout<<"Usage: "<<params::inst().binaryName<<" [OPTION]... [CONFIGFILE]"<<endl; + cout<<" "<<endl; + cout<<" CONFIGFILE common miner configuration file"<<endl; + cout<<" -h, --help show this help"<<endl; +#ifndef CONF_NO_CPU + cout<<" --noCPU disable the CPU miner backend"<<endl; + cout<<" --cpu FILE CPU backend miner config file"<<endl; +#endif +#ifndef CONF_NO_OPENCL + cout<<" --noAMD disable the AMD miner backend"<<endl; + cout<<" --amd FILE AMD backend miner config file"<<endl; +#endif +#ifndef CONF_NO_CUDA + cout<<" --noNVIDIA disable the NVIDIA miner backend"<<endl; + cout<<" --nvidia FILE NVIDIA backend miner config file"<<endl; +#endif + cout<<" "<<endl; + cout<<"The Following options temporary overwrites the config file settings:"<<endl; + cout<<" -o, --url URL pool url and port, e.g. pool.usxmrpool.com:3333"<<endl; + cout<<" -u, --user USERNAME pool user name or wallet address"<<endl; + cout<<" -p, --pass PASSWD pool password, in the most cases x or empty \"\""<<endl; + cout<<" \n"<<endl; + cout<<XMR_STAK_NAME<<" "<<XMR_STAK_VERSION<<endl; + cout<<"Brought to by fireice_uk and psychocrypt under GPLv3."<<endl; } int main(int argc, char *argv[]) @@ -90,6 +112,7 @@ int main(int argc, char *argv[]) if(params::inst().binaryName.compare(pathWithName) != 0) params::inst().executablePrefix = std::string(pathWithName, 0, pos); + bool userSetPasswd = false; for(int i = 1; i < argc; ++i) { std::string opName(argv[i]); @@ -175,6 +198,7 @@ int main(int argc, char *argv[]) win_exit(); return 1; } + userSetPasswd = true; params::inst().poolPasswd = argv[i]; } else @@ -203,7 +227,7 @@ int main(int argc, char *argv[]) std::cin >> userName; } auto& passwd = params::inst().poolPasswd; - if(passwd.empty()) + if(passwd.empty() && (!userSetPasswd)) { // clear everything from stdin to allow an empty password std::cin.clear(); std::cin.ignore(INT_MAX,'\n'); |