summaryrefslogtreecommitdiffstats
path: root/xmrstak/cli
diff options
context:
space:
mode:
authorpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-29 22:37:22 +0200
committerpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-30 23:46:08 +0200
commit21463c59c77f463d04a32c9d0a275452452e3f5a (patch)
tree7a0c6d06794e9821a9d62bb9e8f424b2e9fe554e /xmrstak/cli
parentd80cc9061d2459130dae6608cb29765055c44906 (diff)
downloadxmr-stak-21463c59c77f463d04a32c9d0a275452452e3f5a.zip
xmr-stak-21463c59c77f463d04a32c9d0a275452452e3f5a.tar.gz
use call prefix to load backends
Diffstat (limited to 'xmrstak/cli')
-rw-r--r--xmrstak/cli/cli-miner.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/xmrstak/cli/cli-miner.cpp b/xmrstak/cli/cli-miner.cpp
index 7e0fc9b..71a1af3 100644
--- a/xmrstak/cli/cli-miner.cpp
+++ b/xmrstak/cli/cli-miner.cpp
@@ -60,7 +60,8 @@ void help()
using namespace std;
using namespace xmrstak;
- cout<<"Usage: "<<params::inst().executablePrefix<<" [--help|-h] [--benchmark] [-c CONFIGFILE] [CONFIG FILE]"<<endl;
+ cout<<"Usage: "<<params::inst().binaryName<<" [OPTIONS] [CONFIG FILE]"<<endl;
+
}
int main(int argc, char *argv[])
@@ -85,8 +86,9 @@ int main(int argc, char *argv[])
// try windows "\"
pos = pathWithName.rfind("\\");
}
-
- params::inst().executablePrefix = std::string(pathWithName, 0, pos);
+ params::inst().binaryName = std::string(pathWithName, pos + 1, std::string::npos);
+ if(params::inst().binaryName.compare(pathWithName) != 0)
+ params::inst().executablePrefix = std::string(pathWithName, 0, pos);
for(int i = 1; i < argc; ++i)
{
OpenPOWER on IntegriCloud