Browse Source

ccminer: be more quiet with -q, skip header noise

2upstream
Tanguy Pruvot 8 years ago
parent
commit
099389f64f
  1. 30
      ccminer.cpp

30
ccminer.cpp

@ -3409,6 +3409,25 @@ static void parse_cmdline(int argc, char *argv[]) @@ -3409,6 +3409,25 @@ static void parse_cmdline(int argc, char *argv[])
}
}
static void parse_single_opt(int opt, int argc, char *argv[])
{
int key, prev = optind;
while (1) {
#if HAVE_GETOPT_LONG
key = getopt_long(argc, argv, short_options, options, NULL);
#else
key = getopt(argc, argv, short_options);
#endif
if (key < 0)
break;
if (key == opt /* || key == 'c'*/)
parse_arg(key, optarg);
}
//todo with a filter: parse_config(opt_config);
optind = prev; // reset argv index
}
#ifndef WIN32
static void signal_handler(int sig)
{
@ -3460,7 +3479,11 @@ int main(int argc, char *argv[]) @@ -3460,7 +3479,11 @@ int main(int argc, char *argv[])
long flags;
int i;
// get opt_quiet early
parse_single_opt('q', argc, argv);
printf("*** ccminer " PACKAGE_VERSION " for nVidia GPUs by tpruvot@github ***\n");
if (!opt_quiet) {
#ifdef _MSC_VER
printf(" Built with VC++ %d and nVidia CUDA SDK %d.%d\n\n", msver(),
#else
@ -3470,6 +3493,7 @@ int main(int argc, char *argv[]) @@ -3470,6 +3493,7 @@ int main(int argc, char *argv[])
printf(" Originally based on Christian Buchner and Christian H. project\n");
printf(" Include some algos from alexis78, djm34, sp, tsiv and klausT.\n\n");
printf("BTC donation address: 1AJdfCpLWPNoAMDfHF1wD5y8VgKSSTHxPo (tpruvot)\n\n");
}
rpc_user = strdup("");
rpc_pass = strdup("");
@ -3521,12 +3545,6 @@ int main(int argc, char *argv[]) @@ -3521,12 +3545,6 @@ int main(int argc, char *argv[])
/* parse command line */
parse_cmdline(argc, argv);
// extra credits..
if (opt_algo == ALGO_VANILLA) {
printf(" Vanilla blake optimized by Alexis Provos.\n");
printf("XVC donation address: Vr5oCen8NrY6ekBWFaaWjCUFBH4dyiS57W\n\n");
}
if (!opt_benchmark && !strlen(rpc_url)) {
// try default config file (user then binary folder)
char defconfig[MAX_PATH] = { 0 };

Loading…
Cancel
Save