X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fstatus.c;h=23e8c03d390bc8fa2007cd82e7e271ec5bcda810;hb=cb1b81ea79adcdc60a2ead88aa787dbbcb2bf422;hp=693527535418cb647a6b8400ccc247d6cd4e39f1;hpb=4ba92f185fb1d0b112cbc804a261939f5f81dc34;p=lttng-tools.git diff --git a/src/bin/lttng/commands/status.c b/src/bin/lttng/commands/status.c index 693527535..23e8c03d3 100644 --- a/src/bin/lttng/commands/status.c +++ b/src/bin/lttng/commands/status.c @@ -1,18 +1,8 @@ /* - * Copyright (C) 2015 - Philippe Proulx + * Copyright (C) 2015 Philippe Proulx * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #define _LGPL_SOURCE @@ -28,6 +18,12 @@ #include "../utils.h" #include +#ifdef LTTNG_EMBED_HELP +static const char help_msg[] = +#include +; +#endif + enum { OPT_HELP = 1, OPT_LIST_OPTIONS, @@ -40,15 +36,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]; @@ -89,7 +76,6 @@ int cmd_status(int argc, const char **argv) list_cmd_options(stdout, long_options); goto end; default: - usage(stderr); ret = CMD_UNDEFINED; goto end; } @@ -97,7 +83,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; }