X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Ftrack-untrack.c;h=3771de5d94b5b7bfcaacf26b0663044cecaac98f;hp=6d8d91ffd73b70948c371cb69dbe0a9bc9e14210;hb=38b4ef1b199ddb15db78774a39e9c524ca7e2d24;hpb=4ba92f185fb1d0b112cbc804a261939f5f81dc34 diff --git a/src/bin/lttng/commands/track-untrack.c b/src/bin/lttng/commands/track-untrack.c index 6d8d91ffd..3771de5d9 100644 --- a/src/bin/lttng/commands/track-untrack.c +++ b/src/bin/lttng/commands/track-untrack.c @@ -64,28 +64,6 @@ static struct poptOption long_options[] = { { 0, 0, 0, 0, 0, 0, 0, }, }; -/* - * usage - */ -static void usage(FILE *ofp, const char *cmd_str) -{ - fprintf(ofp, "usage: lttng %s [-k|-u] [OPTIONS]\n", cmd_str); - fprintf(ofp, "\n"); - fprintf(ofp, "If no session is given (-s), the context is added to\n"); - fprintf(ofp, "the current sesssion. Exactly one domain (-k or -u)\n"); - fprintf(ofp, "must be specified.\n"); - fprintf(ofp, "\n"); - fprintf(ofp, "Options:\n"); - fprintf(ofp, " -h, --help Show this help.\n"); - fprintf(ofp, " --list-options Simple listing of options.\n"); - fprintf(ofp, " -s, --session NAME Apply to session name.\n"); - fprintf(ofp, " -k, --kernel Apply to the kernel tracer.\n"); - fprintf(ofp, " -u, --userspace Apply to the user-space tracer.\n"); - fprintf(ofp, " -p, --pid [PID] Process ID tracker. Leave PID empty when used with --all.\n"); - fprintf(ofp, " -a, --all All PIDs (use with --pid).\n"); - fprintf(ofp, "\n"); -} - static int parse_pid_string(const char *_pid_string, int all, int **_pid_list, int *nr_pids) @@ -236,7 +214,6 @@ enum cmd_error_code track_untrack_pid(enum cmd_type cmd_type, const char *cmd_st ret = parse_pid_string(pid_string, all, &pid_list, &nr_pids); if (ret != CMD_SUCCESS) { ERR("Error parsing PID string"); - usage(stderr, cmd_str); retval = CMD_ERROR; goto end; } @@ -353,7 +330,6 @@ int cmd_track_untrack(enum cmd_type cmd_type, const char *cmd_str, struct mi_writer *writer = NULL; if (argc < 1) { - usage(stderr, cmd_str); command_ret = CMD_ERROR; goto end; } @@ -374,7 +350,6 @@ int cmd_track_untrack(enum cmd_type cmd_type, const char *cmd_str, opt_pid = 1; break; default: - usage(stderr, cmd_str); command_ret = CMD_UNDEFINED; goto end; } @@ -399,7 +374,6 @@ int cmd_track_untrack(enum cmd_type cmd_type, const char *cmd_str, /* Currently only PID tracker is supported */ if (!opt_pid) { ERR("Please specify at least one tracker with its expected arguments"); - usage(stderr, cmd_str); command_ret = CMD_ERROR; goto end; }