[lttng-dev] [PATCH lttng-tools] Fix: return valid domain flag options on missing/invalid domain flag error
Jonathan Rajotte
jonathan.rajotte-julien at efficios.com
Wed Aug 19 18:47:25 EDT 2015
Fixes: 905
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
---
src/bin/lttng/commands/disable_events.c | 2 +-
src/bin/lttng/commands/enable_events.c | 4 ++--
src/bin/lttng/utils.h | 8 +++++++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/bin/lttng/commands/disable_events.c b/src/bin/lttng/commands/disable_events.c
index 45e91a8..fec118a 100644
--- a/src/bin/lttng/commands/disable_events.c
+++ b/src/bin/lttng/commands/disable_events.c
@@ -185,7 +185,7 @@ static int disable_events(char *session_name)
} else if (opt_python) {
dom.type = LTTNG_DOMAIN_PYTHON;
} else {
- print_missing_domain();
+ print_missing_event_domain();
ret = CMD_ERROR;
goto error;
}
diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c
index 356fef4..662009d 100644
--- a/src/bin/lttng/commands/enable_events.c
+++ b/src/bin/lttng/commands/enable_events.c
@@ -721,7 +721,7 @@ static int enable_events(char *session_name)
/* Default. */
dom.buf_type = LTTNG_BUFFER_PER_UID;
} else {
- print_missing_domain();
+ print_missing_event_domain();
ret = CMD_ERROR;
goto error;
}
@@ -1136,7 +1136,7 @@ static int enable_events(char *session_name)
strncpy(ev.name, event_name, LTTNG_SYMBOL_NAME_LEN);
ev.name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
} else {
- print_missing_domain();
+ print_missing_event_domain();
ret = CMD_ERROR;
goto error;
}
diff --git a/src/bin/lttng/utils.h b/src/bin/lttng/utils.h
index 0755731..5353490 100644
--- a/src/bin/lttng/utils.h
+++ b/src/bin/lttng/utils.h
@@ -57,9 +57,15 @@ int get_count_order_ulong(unsigned long x);
const char *get_domain_str(enum lttng_domain_type domain);
static inline
+void print_missing_event_domain(void)
+{
+ ERR("Please specify a domain (-k/-u/-j/-l/-p).");
+}
+
+static inline
void print_missing_domain(void)
{
- ERR("Please specify a domain (-k/-u/-j).");
+ ERR("Please specify a domain (-k/-u).");
}
int spawn_relayd(const char *pathname, int port);
--
2.1.4
More information about the lttng-dev
mailing list