summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-07-06 16:41:55 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-07-06 19:02:20 +0100
commit59f21c4d124373cea4cb98e976704d4b2da900b3 (patch)
tree0c87425d429042d9707d47c855d0a16837e272b9 /cli
parent7383464db0ec6fd64a2f8e9372be495df11fd05e (diff)
inject: Allow to control verbosity via a command line option.
Diffstat (limited to 'cli')
-rw-r--r--cli/cli_trace.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/cli/cli_trace.cpp b/cli/cli_trace.cpp
index 5875057a..d7ed3439 100644
--- a/cli/cli_trace.cpp
+++ b/cli/cli_trace.cpp
@@ -92,7 +92,7 @@ static int
traceProgram(trace::API api,
char * const *argv,
const char *output,
- bool verbose,
+ int verbose,
bool debug)
{
const char *wrapperFilename;
@@ -155,6 +155,9 @@ traceProgram(trace::API api,
if (debug) {
args.push_back("-d");
}
+ for (int i = 1; i < verbose; ++i) {
+ args.push_back("-v");
+ }
args.push_back("-D");
args.push_back(wrapperPath);
args.push_back("--");
@@ -345,7 +348,7 @@ longOptions[] = {
static int
command(int argc, char *argv[])
{
- bool verbose = false;
+ int verbose = 0;
trace::API api = trace::API_GL;
const char *output = NULL;
bool debug = false;
@@ -357,7 +360,7 @@ command(int argc, char *argv[])
usage();
return 0;
case 'v':
- verbose = true;
+ ++verbose;
break;
case 'a':
if (strcmp(optarg, "gl") == 0) {