Add verbose option to session daemon
authorDavid Goulet <david.goulet@polymtl.ca>
Mon, 2 May 2011 18:08:03 +0000 (14:08 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Mon, 2 May 2011 18:08:15 +0000 (14:08 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
ltt-sessiond/main.c

index 720d23439c99b855546617f503ad2fc609373b46..450a6ffc8c075c4f905fd465f6298c8add38a760 100644 (file)
@@ -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 */
This page took 0.02526 seconds and 4 git commands to generate.