Actions
Bug #586
closed
DT
Hidden command option for lttng calibrate
Bug #586:
Hidden command option for lttng calibrate
Start date:
07/08/2013
Due date:
% Done:
100%
Estimated time:
Description
This is pretty harmless but s also easily fixed. In lttng-tools-2.2.0\src\bin\lttng\commands\calibrate.c, we have:
static struct poptOption long_options[] = {
/* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
{"help", 'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0},
{"kernel", 'k', POPT_ARG_VAL, &opt_kernel, 1, 0, 0},
#if 0
/* Not implemented yet */
...
#else
{"userspace", 'u', POPT_ARG_NONE, 0, OPT_USERSPACE, 0, 0},
{"function", 0, POPT_ARG_NONE, 0, OPT_FUNCTION, 0, 0},
#endif
#if 0
/*
* Removed from options to discourage its use. Not in kernel
* tracer anymore.
*/
{"function:entry", 0, POPT_ARG_NONE, 0, OPT_FUNCTION_ENTRY, 0, 0},
#endif
{"syscall", 0, POPT_ARG_NONE, 0, OPT_SYSCALL, 0, 0},
{"list-options", 0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, NULL, NULL},
{0, 0, 0, 0, 0, 0, 0}
};
/*
* usage
*/
static void usage(FILE *ofp)
{
fprintf(ofp, "usage: lttng calibrate [-k|-u] [OPTIONS]\n");
fprintf(ofp, "\n");
fprintf(ofp, "Options:\n");
...
#if 0
fprintf(ofp, " --tracepoint Tracepoint event (default)\n");
fprintf(ofp, " --probe\n");
fprintf(ofp, " Dynamic probe.\n");
#if 0
fprintf(ofp, " --function:entry symbol\n");
fprintf(ofp, " Function tracer event\n");
#endif
fprintf(ofp, " --syscall System call eventl\n");
fprintf(ofp, " --marker User-space marker (deprecated)\n");
#endif
fprintf(ofp, "\n");
}
The static struct poptOption long_options[] includes the --syscall command option but the static void usage(FILE *ofp) excludes it from the displayed help. Using it on the command line yields CMD_UNDEFINED, which is fine.
DG Updated by David Goulet over 12 years ago
- Status changed from New to Confirmed
- Target version set to 2.2
Please provide patch, that would be most welcome! :)
DG Updated by David Goulet over 12 years ago
- Status changed from Confirmed to Resolved
- % Done changed from 0 to 100
Applied in changeset 5c6886fa361bbfc0db831dd71d5a97b068a46b5b.
Actions