From cc62c0c06bbfb22885debcaba1164e31cfa4f87b Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 1 Feb 2012 18:19:20 -0500 Subject: [PATCH] Fix enable channel usage and add enable event error msg Channel options were missing details to the usage text. Also, add an error message if an event option is passed to user-space that is not supported. Signed-off-by: David Goulet --- src/bin/lttng/commands/enable_channels.c | 8 ++++---- src/bin/lttng/commands/enable_events.c | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index 942dbf00e..912e3b041 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -100,17 +100,17 @@ static void usage(FILE *ofp) DEFAULT_CHANNEL_OVERWRITE ? "" : " (default)"); fprintf(ofp, " --overwrite Flight recorder mode%s\n", DEFAULT_CHANNEL_OVERWRITE ? " (default)" : ""); - fprintf(ofp, " --subbuf-size Subbuffer size in bytes\n"); + fprintf(ofp, " --subbuf-size SIZE Subbuffer size in bytes\n"); fprintf(ofp, " (default: %u, kernel default: %u)\n", DEFAULT_CHANNEL_SUBBUF_SIZE, DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE); - fprintf(ofp, " --num-subbuf Number of subbufers\n"); + fprintf(ofp, " --num-subbuf NUM Number of subbufers\n"); fprintf(ofp, " (default: %u, kernel default: %u)\n", DEFAULT_CHANNEL_SUBBUF_NUM, DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM); - fprintf(ofp, " --switch-timer Switch timer interval in usec (default: %u)\n", + fprintf(ofp, " --switch-timer USEC Switch timer interval in usec (default: %u)\n", DEFAULT_CHANNEL_SWITCH_TIMER); - fprintf(ofp, " --read-timer Read timer interval in usec (default: %u)\n", + fprintf(ofp, " --read-timer USEC Read timer interval in usec (default: %u)\n", DEFAULT_CHANNEL_READ_TIMER); fprintf(ofp, "\n"); } diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index 5beb5a2b2..125c40fe0 100644 --- a/src/bin/lttng/commands/enable_events.c +++ b/src/bin/lttng/commands/enable_events.c @@ -369,6 +369,7 @@ static int enable_events(char *session_name) case LTTNG_EVENT_FUNCTION_ENTRY: case LTTNG_EVENT_SYSCALL: default: + ERR("Event type not available for user-space tracing"); ret = CMD_UNDEFINED; goto error; } -- 2.34.1