*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation; only version 2
+ * of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
{
int ret;
pid_t pid;
+ const char *verbosity;
DBG("Spawning kconsumerd");
/*
* Exec kconsumerd.
*/
- execlp("ltt-kconsumerd", "ltt-kconsumerd", "--verbose", 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");
}
*/
static int start_kernel_trace(struct ltt_kernel_session *session)
{
- int ret;
+ int ret = 0;
if (session->kconsumer_fds_sent == 0) {
ret = send_kconsumerd_fds(kconsumerd_cmd_sock, session);
*/
static int process_client_msg(struct command_ctx *cmd_ctx)
{
- int ret;
+ int ret = LTTCOMM_OK;
DBG("Processing client command %d", cmd_ctx->lsm->cmd_type);
}
ret = kernel_create_channel(cmd_ctx->session->kernel_session,
- &cmd_ctx->lsm->u.channel.chan, cmd_ctx->session->path);
+ chan, cmd_ctx->session->path);
if (ret < 0) {
ret = LTTCOMM_KERN_CHAN_FAIL;
goto error;
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.