Add --verbose-kconsumerd option to sessiond
[lttng-tools.git] / ltt-sessiond / main.c
index 98bdb6a4d6912c8a97117a59c114a6d54ee065ae..1139df8b94fd26e256d10be10b6dda15965616b0 100644 (file)
@@ -60,6 +60,7 @@ const char default_global_apps_pipe[] = DEFAULT_GLOBAL_APPS_PIPE;
 
 /* Variables */
 int opt_verbose;    /* Not static for lttngerr.h */
 
 /* Variables */
 int opt_verbose;    /* Not static for lttngerr.h */
+int opt_verbose_kconsumerd;    /* Not static for lttngerr.h */
 int opt_quiet;      /* Not static for lttngerr.h */
 
 const char *progname;
 int opt_quiet;      /* Not static for lttngerr.h */
 
 const char *progname;
@@ -900,7 +901,7 @@ static pid_t spawn_kconsumerd(void)
                /*
                 * Exec kconsumerd.
                 */
                /*
                 * Exec kconsumerd.
                 */
-               if (opt_verbose > 1) {
+               if (opt_verbose > 1 || opt_verbose_kconsumerd) {
                        verbosity = "--verbose";
                } else {
                        verbosity = "--quiet";
                        verbosity = "--verbose";
                } else {
                        verbosity = "--quiet";
@@ -2280,6 +2281,7 @@ static void usage(void)
        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");
        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");
+       fprintf(stderr, "      --verbose-kconsumerd           Verbose mode for kconsumerd. Activate DBG() macro.\n");
 }
 
 /*
 }
 
 /*
@@ -2301,12 +2303,13 @@ static int parse_args(int argc, char **argv)
                { "version", 0, 0, 'V' },
                { "quiet", 0, 0, 'q' },
                { "verbose", 0, 0, 'v' },
                { "version", 0, 0, 'V' },
                { "quiet", 0, 0, 'q' },
                { "verbose", 0, 0, 'v' },
+               { "verbose-kconsumerd", 0, 0, 'Z' },
                { NULL, 0, 0, 0 }
        };
 
        while (1) {
                int option_index = 0;
                { NULL, 0, 0, 0 }
        };
 
        while (1) {
                int option_index = 0;
-               c = getopt_long(argc, argv, "dhqvVS" "a:c:g:s:E:C:", long_options, &option_index);
+               c = getopt_long(argc, argv, "dhqvVS" "a:c:g:s:E:C:Z", long_options, &option_index);
                if (c == -1) {
                        break;
                }
                if (c == -1) {
                        break;
                }
@@ -2352,6 +2355,9 @@ static int parse_args(int argc, char **argv)
                        /* Verbose level can increase using multiple -v */
                        opt_verbose += 1;
                        break;
                        /* Verbose level can increase using multiple -v */
                        opt_verbose += 1;
                        break;
+               case 'Z':
+                       opt_verbose_kconsumerd += 1;
+                       break;
                default:
                        /* Unknown option or other error.
                         * Error is printed by getopt, just return */
                default:
                        /* Unknown option or other error.
                         * Error is printed by getopt, just return */
This page took 0.02467 seconds and 4 git commands to generate.