projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: remove empty line in lttng create command
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
metadata.c
diff --git
a/src/bin/lttng/commands/metadata.c
b/src/bin/lttng/commands/metadata.c
index f6a821af3d30c4f72b320d6837f47ad7b3eaf128..663099dfd5c181f0827f44e1c6e1a338e2f5b9a1 100644
(file)
--- a/
src/bin/lttng/commands/metadata.c
+++ b/
src/bin/lttng/commands/metadata.c
@@
-33,6
+33,12
@@
static char *session_name = NULL;
static int metadata_regenerate(int argc, const char **argv);
static int metadata_regenerate(int argc, const char **argv);
+#ifdef LTTNG_EMBED_HELP
+static const char help_msg[] =
+#include <lttng-metadata.1.h>
+;
+#endif
+
enum {
OPT_HELP = 1,
OPT_LIST_OPTIONS,
enum {
OPT_HELP = 1,
OPT_LIST_OPTIONS,
@@
-76,12
+82,14
@@
static int metadata_regenerate(int argc, const char **argv)
int ret;
if (argc > 1) {
int ret;
if (argc > 1) {
- ret =
-LTTNG_ERR_INVALI
D;
+ ret =
CMD_UNDEFINE
D;
goto end;
}
goto end;
}
- ret = lttng_
metadata_regenerate
(session_name);
+ ret = lttng_
regenerate_metadata
(session_name);
if (ret == 0) {
MSG("Metadata successfully regenerated for session %s", session_name);
if (ret == 0) {
MSG("Metadata successfully regenerated for session %s", session_name);
+ } else {
+ ERR("%s", lttng_strerror(ret));
}
end:
}
end:
@@
-94,8
+102,8
@@
static int handle_command(const char **argv)
int ret = CMD_SUCCESS, i = 0, argc, command_ret = CMD_SUCCESS;
if (argv == NULL) {
int ret = CMD_SUCCESS, i = 0, argc, command_ret = CMD_SUCCESS;
if (argv == NULL) {
- ERR("
argv is null
");
-
command_
ret = CMD_ERROR;
+ ERR("
No action specified for metadata command.
");
+ ret = CMD_ERROR;
goto end;
}
goto end;
}
@@
-215,12
+223,7
@@
int cmd_metadata(int argc, const char **argv)
command_ret = handle_command(poptGetArgs(pc));
if (command_ret) {
command_ret = handle_command(poptGetArgs(pc));
if (command_ret) {
- switch (-command_ret) {
- default:
- ERR("%s", lttng_strerror(command_ret));
- success = 0;
- break;
- }
+ success = 0;
}
if (lttng_opt_mi) {
}
if (lttng_opt_mi) {
This page took
0.025966 seconds
and
4
git commands to generate.