projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Exclusion check iterates multiple times on same array
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
status.c
diff --git
a/src/bin/lttng/commands/status.c
b/src/bin/lttng/commands/status.c
index d9b6c4f277cefb2290b2b7c66046b54df477d6b0..cb7d0329b43faba3b14ef3a5ac1fee8869c6a50e 100644
(file)
--- a/
src/bin/lttng/commands/status.c
+++ b/
src/bin/lttng/commands/status.c
@@
-28,6
+28,12
@@
#include "../utils.h"
#include <config.h>
#include "../utils.h"
#include <config.h>
+#ifdef LTTNG_EMBED_HELP
+static const char help_msg[] =
+#include <lttng-status.1.h>
+;
+#endif
+
enum {
OPT_HELP = 1,
OPT_LIST_OPTIONS,
enum {
OPT_HELP = 1,
OPT_LIST_OPTIONS,
@@
-40,15
+46,6
@@
static struct poptOption long_options[] = {
{0, 0, 0, 0, 0, 0, 0}
};
{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];
static int status(void)
{
const char *argv[2];
@@
-83,13
+80,12
@@
int cmd_status(int argc, const char **argv)
while ((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
case OPT_HELP:
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:
goto end;
case OPT_LIST_OPTIONS:
list_cmd_options(stdout, long_options);
goto end;
default:
- usage(stderr);
ret = CMD_UNDEFINED;
goto end;
}
ret = CMD_UNDEFINED;
goto end;
}
@@
-97,7
+93,6
@@
int cmd_status(int argc, const char **argv)
if (poptPeekArg(pc) != NULL) {
ERR("This command does not accept positional arguments.\n");
if (poptPeekArg(pc) != NULL) {
ERR("This command does not accept positional arguments.\n");
- usage(stderr);
ret = CMD_UNDEFINED;
goto end;
}
ret = CMD_UNDEFINED;
goto end;
}
This page took
0.026964 seconds
and
5
git commands to generate.