Increase possible verbose level for session daemon
authorDavid Goulet <david.goulet@polymtl.ca>
Tue, 26 Jul 2011 13:45:34 +0000 (09:45 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Tue, 26 Jul 2011 13:45:34 +0000 (09:45 -0400)
Using -vv, the kernel consumer goes into verbose mode.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
ltt-sessiond/main.c

index a78cc7e02f04c5572680deae8acfbe93c774d41e..92ece5a11f71017575bababefc9baecbec87415a 100644 (file)
@@ -906,6 +906,7 @@ static pid_t spawn_kconsumerd(void)
 {
        int ret;
        pid_t pid;
+       const char *verbosity;
 
        DBG("Spawning kconsumerd");
 
@@ -914,7 +915,12 @@ static pid_t spawn_kconsumerd(void)
                /*
                 * Exec kconsumerd.
                 */
-               execl(INSTALL_BIN_PATH "/ltt-kconsumerd", "ltt-kconsumerd", "--quiet", NULL);
+               if (opt_verbose > 1) {
+                       verbosity = "--verbose";
+               } else {
+                       verbosity = "--quiet";
+               }
+               execl(INSTALL_BIN_PATH "/ltt-kconsumerd", "ltt-kconsumerd", verbosity, NULL);
                if (errno != 0) {
                        perror("kernel start consumer exec");
                }
@@ -2243,7 +2249,8 @@ static int parse_args(int argc, char **argv)
                        opt_quiet = 1;
                        break;
                case 'v':
-                       opt_verbose = 1;
+                       /* Verbose level can increase using multiple -v */
+                       opt_verbose += 1;
                        break;
                default:
                        /* Unknown option or other error.
This page took 0.036071 seconds and 4 git commands to generate.