projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rotation-api: introduce rotation schedule descriptors
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
start.c
diff --git
a/src/bin/lttng/commands/start.c
b/src/bin/lttng/commands/start.c
index 03d99cf4143b4f5a42245a474af9663d9f2e92d6..65b2229245408efc5883ab2d0078dfe47b30a6fe 100644
(file)
--- a/
src/bin/lttng/commands/start.c
+++ b/
src/bin/lttng/commands/start.c
@@
-33,6
+33,12
@@
static char *opt_session_name;
static struct mi_writer *writer;
static char *opt_session_name;
static struct mi_writer *writer;
+#ifdef LTTNG_EMBED_HELP
+static const char help_msg[] =
+#include <lttng-start.1.h>
+;
+#endif
+
enum {
OPT_HELP = 1,
OPT_LIST_OPTIONS,
enum {
OPT_HELP = 1,
OPT_LIST_OPTIONS,
@@
-138,6
+144,7
@@
int cmd_start(int argc, const char **argv)
{
int opt, ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success = 1;
static poptContext pc;
{
int opt, ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success = 1;
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);
@@
-158,6
+165,13
@@
int cmd_start(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;
+ }
+
/* Mi check */
if (lttng_opt_mi) {
writer = mi_lttng_writer_create(fileno(stdout), lttng_opt_mi);
/* Mi check */
if (lttng_opt_mi) {
writer = mi_lttng_writer_create(fileno(stdout), lttng_opt_mi);
This page took
0.024269 seconds
and
4
git commands to generate.