X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_events.c;h=278090f352c8295dd69341d30a5964afbde17940;hb=abc9138a92fb32f5525f29160aabd6dc18e441cd;hp=bc520b3f6986a1e290ff1b7a2948f18435d0d30a;hpb=46839cc293bbeddbc1a47dbc898ee8f9e2a52a1a;p=lttng-tools.git diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index bc520b3f6..278090f35 100644 --- a/src/bin/lttng/commands/enable_events.c +++ b/src/bin/lttng/commands/enable_events.c @@ -1,19 +1,18 @@ /* * Copyright (C) 2011 - David Goulet * - * 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; only version 2 - * of the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2 only, + * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #define _GNU_SOURCE @@ -104,7 +103,7 @@ static void usage(FILE *ofp) fprintf(ofp, " --list-options Simple listing of options\n"); fprintf(ofp, " -s, --session Apply to session name\n"); fprintf(ofp, " -c, --channel Apply to this channel\n"); - fprintf(ofp, " -a, --all Enable all tracepoints\n"); + fprintf(ofp, " -a, --all Enable all tracepoints and syscalls\n"); fprintf(ofp, " -k, --kernel Apply for the kernel tracer\n"); #if 0 fprintf(ofp, " -u, --userspace [CMD] Apply to the user-space tracer\n"); @@ -351,9 +350,15 @@ static int enable_events(char *session_name) switch (opt_event_type) { case LTTNG_EVENT_TRACEPOINT: - MSG("All %s tracepoints are enabled in channel %s for loglevel %s", - opt_kernel ? "kernel" : "UST", channel_name, - opt_loglevel ? : ""); + if (opt_loglevel) { + MSG("All %s tracepoints are enabled in channel %s for loglevel %s", + opt_kernel ? "kernel" : "UST", channel_name, + opt_loglevel); + } else { + MSG("All %s tracepoints are enabled in channel %s", + opt_kernel ? "kernel" : "UST", channel_name); + + } break; case LTTNG_EVENT_SYSCALL: if (opt_kernel) { @@ -362,9 +367,14 @@ static int enable_events(char *session_name) } break; case LTTNG_EVENT_ALL: - MSG("All %s events are enabled in channel %s for loglevel %s", - opt_kernel ? "kernel" : "UST", channel_name, - opt_loglevel ? : ""); + if (opt_loglevel) { + MSG("All %s events are enabled in channel %s for loglevel %s", + opt_kernel ? "kernel" : "UST", channel_name, + opt_loglevel); + } else { + MSG("All %s events are enabled in channel %s", + opt_kernel ? "kernel" : "UST", channel_name); + } break; default: /*