From: David Goulet Date: Mon, 2 May 2011 18:08:03 +0000 (-0400) Subject: Add verbose option to session daemon X-Git-Tag: v2.0-pre1~159 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=3f9947db38d28a772b76dc63ab5688ef4037b107;hp=ce3d728cd9bfcc0f7d43e08275a92cf04e898662 Add verbose option to session daemon Signed-off-by: David Goulet --- diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index 720d23439..450a6ffc8 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -587,6 +587,7 @@ static void usage(void) fprintf(stderr, " -V, --version Show version number.\n"); fprintf(stderr, " -S, --sig-parent Send SIGCHLD to parent pid to notify readiness.\n"); fprintf(stderr, " -q, --quiet No output at all.\n"); + fprintf(stderr, " -v, --verbose Verbose mode. Activate DBG() macro.\n"); } /* @@ -605,12 +606,13 @@ static int parse_args(int argc, char **argv) { "group", 1, 0, 'g' }, { "version", 0, 0, 'V' }, { "quiet", 0, 0, 'q' }, + { "verbose", 0, 0, 'v' }, { NULL, 0, 0, 0 } }; while (1) { int option_index = 0; - c = getopt_long(argc, argv, "dhqVS" "a:c:g:s:", long_options, &option_index); + c = getopt_long(argc, argv, "dhqvVS" "a:c:g:s:", long_options, &option_index); if (c == -1) { break; } @@ -646,6 +648,9 @@ static int parse_args(int argc, char **argv) case 'q': opt_quiet = 1; break; + case 'v': + opt_verbose = 1; + break; default: /* Unknown option or other error. * Error is printed by getopt, just return */