enum {
OPT_HELP = 1,
OPT_USERSPACE,
+ OPT_LIST_OPTIONS,
};
static struct lttng_handle *handle;
#endif
{"channel", 'c', POPT_ARG_STRING, &opt_channel, 0, 0, 0},
{"domain", 'd', POPT_ARG_VAL, &opt_domain, 1, 0, 0},
+ {"list-options", 0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, NULL, NULL},
{0, 0, 0, 0, 0, 0, 0}
};
*/
static void usage(FILE *ofp)
{
- fprintf(ofp, "usage: lttng list [[-k] [-u] [-p PID] [SESSION [<options>]]]\n");
+ fprintf(ofp, "usage: lttng list [SESSION [<OPTIONS>]]\n");
fprintf(ofp, "\n");
fprintf(ofp, "With no arguments, list available tracing session(s)\n");
fprintf(ofp, "\n");
fprintf(ofp, "With -u alone, list available userspace events\n");
fprintf(ofp, "\n");
fprintf(ofp, " -h, --help Show this help\n");
+ fprintf(ofp, " --list-options Simple listing of options\n");
fprintf(ofp, " -k, --kernel Select kernel domain\n");
fprintf(ofp, " -u, --userspace Select user-space domain.\n");
#if 0
ret = snprintf(ll_value, LTTNG_SYMBOL_NAME_LEN,
" (%lld)", (long long) event->loglevel_value);
- if (ret < 0)
+ if (ret < 0) {
ERR("snprintf error");
+ }
}
MSG("%s%s%s%s%s%s (type: tracepoint)%s", indent6,
event->name,
MSG("%s (type: noop)%s", indent6,
enabled_string(event->enabled));
break;
- case LTTNG_EVENT_TRACEPOINT_LOGLEVEL:
- MSG("%s%s (type: tracepoint loglevel)%s", indent6,
- event->name,
- enabled_string(event->enabled));
- break;
case LTTNG_EVENT_ALL:
/* We should never have "all" events in list. */
assert(0);
case OPT_USERSPACE:
opt_userspace = 1;
break;
+ case OPT_LIST_OPTIONS:
+ list_cmd_options(stdout, long_options);
+ ret = CMD_SUCCESS;
+ goto end;
default:
usage(stderr);
ret = CMD_UNDEFINED;