X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fstatus.c;h=5daabdac2f7ec62dd2b67d56d029b5f8a0ad8221;hp=b3555c9840cba2f2cba2463bcfc448f31d2d93f9;hb=e223f308e0f0899d4c6d129922cad25d3b718efc;hpb=54a0adbf3cf5cd691d57b9ebaef083cad30273e1 diff --git a/src/bin/lttng/commands/status.c b/src/bin/lttng/commands/status.c index b3555c984..5daabdac2 100644 --- a/src/bin/lttng/commands/status.c +++ b/src/bin/lttng/commands/status.c @@ -15,7 +15,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include @@ -41,15 +40,6 @@ static struct poptOption long_options[] = { {0, 0, 0, 0, 0, 0, 0} }; -static void usage(FILE *ofp) -{ - fprintf(ofp, "Usage: lttng status [options]\n"); - fprintf(ofp, "\n"); - fprintf(ofp, "Options:\n"); - fprintf(ofp, " -h, --help Show this help\n"); - fprintf(ofp, " --list-options List options\n"); -} - static int status(void) { const char *argv[2]; @@ -84,13 +74,12 @@ int cmd_status(int argc, const char **argv) while ((opt = poptGetNextOpt(pc)) != -1) { switch (opt) { case OPT_HELP: - usage(stdout); + SHOW_HELP(); goto end; case OPT_LIST_OPTIONS: list_cmd_options(stdout, long_options); goto end; default: - usage(stderr); ret = CMD_UNDEFINED; goto end; } @@ -98,7 +87,6 @@ int cmd_status(int argc, const char **argv) if (poptPeekArg(pc) != NULL) { ERR("This command does not accept positional arguments.\n"); - usage(stderr); ret = CMD_UNDEFINED; goto end; }