projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement userspace probe location extraction and registration
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
view.c
diff --git
a/src/bin/lttng/commands/view.c
b/src/bin/lttng/commands/view.c
index 09acc30f42d20803a993c4a777a8496e976b9b74..faca60de8b980adfe60afcb2ac68a7c202a65595 100644
(file)
--- a/
src/bin/lttng/commands/view.c
+++ b/
src/bin/lttng/commands/view.c
@@
-32,6
+32,12
@@
static char *opt_trace_path;
static const char *babeltrace_bin = CONFIG_BABELTRACE_BIN;
//static const char *lttv_gui_bin = CONFIG_LTTV_GUI_BIN;
static const char *babeltrace_bin = CONFIG_BABELTRACE_BIN;
//static const char *lttv_gui_bin = CONFIG_LTTV_GUI_BIN;
+#ifdef LTTNG_EMBED_HELP
+static const char help_msg[] =
+#include <lttng-view.1.h>
+;
+#endif
+
enum {
OPT_HELP = 1,
OPT_LIST_OPTIONS,
enum {
OPT_HELP = 1,
OPT_LIST_OPTIONS,
@@
-253,12
+259,12
@@
static int spawn_viewer(const char *trace_path)
} else {
PERROR("exec: %s", viewer_bin);
}
} else {
PERROR("exec: %s", viewer_bin);
}
- free(argv);
ret = CMD_FATAL;
goto error;
}
error:
ret = CMD_FATAL;
goto error;
}
error:
+ free(argv);
return ret;
}
return ret;
}
@@
-409,6
+415,7
@@
int cmd_view(int argc, const char **argv)
{
int opt, ret = CMD_SUCCESS;
static poptContext pc;
{
int opt, ret = CMD_SUCCESS;
static poptContext pc;
+ const char *leftover = NULL;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
pc = poptGetContext(NULL, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
@@
-433,6
+440,13
@@
int cmd_view(int argc, const char **argv)
opt_session_name = (char*) poptGetArg(pc);
opt_session_name = (char*) poptGetArg(pc);
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ goto end;
+ }
+
ret = view_trace();
end:
ret = view_trace();
end:
This page took
0.024206 seconds
and
4
git commands to generate.