Using -vv, the kernel consumer goes into verbose mode.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
{
int ret;
pid_t pid;
+ const char *verbosity;
DBG("Spawning kconsumerd");
/*
* 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");
}
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.