projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: possible invalid free in kernel thread
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
list.c
diff --git
a/src/bin/lttng/commands/list.c
b/src/bin/lttng/commands/list.c
index afd7cf0b3172c291046710c621625d465c675c3b..48b2c82763e3bb69a40987e9f42f41e765355037 100644
(file)
--- a/
src/bin/lttng/commands/list.c
+++ b/
src/bin/lttng/commands/list.c
@@
-280,8
+280,8
@@
static void print_event_field(struct lttng_event_field *field)
if (!field->field_name[0]) {
return;
}
if (!field->field_name[0]) {
return;
}
- MSG("%sfield: %s (%s)", indent8, field->field_name,
- field_type(field));
+ MSG("%sfield: %s (%s)
%s
", indent8, field->field_name,
+ field_type(field)
, field->nowrite ? " [no write]" : ""
);
}
/*
}
/*
@@
-521,11
+521,17
@@
static int list_channels(const char *channel_name)
count = lttng_list_channels(handle, &channels);
if (count < 0) {
count = lttng_list_channels(handle, &channels);
if (count < 0) {
- ret = count;
+ switch (-count) {
+ case LTTNG_ERR_KERN_CHAN_NOT_FOUND:
+ ret = CMD_SUCCESS;
+ WARN("No kernel channel");
+ break;
+ default:
+ /* We had a real error */
+ ret = count;
+ ERR("%s", lttng_strerror(ret));
+ }
goto error_channels;
goto error_channels;
- } else if (count == 0) {
- ERR("Channel %s not found", channel_name);
- goto error;
}
if (channel_name == NULL) {
}
if (channel_name == NULL) {
@@
-674,8
+680,7
@@
error:
*/
int cmd_list(int argc, const char **argv)
{
*/
int cmd_list(int argc, const char **argv)
{
- int opt, i, ret = CMD_SUCCESS;
- int nb_domain;
+ int opt, ret = CMD_SUCCESS;
const char *session_name;
static poptContext pc;
struct lttng_domain domain;
const char *session_name;
static poptContext pc;
struct lttng_domain domain;
@@
-772,6
+777,8
@@
int cmd_list(int argc, const char **argv)
goto end;
}
} else {
goto end;
}
} else {
+ int i, nb_domain;
+
/* We want all domain(s) */
nb_domain = lttng_list_domains(session_name, &domains);
if (nb_domain < 0) {
/* We want all domain(s) */
nb_domain = lttng_list_domains(session_name, &domains);
if (nb_domain < 0) {
This page took
0.024539 seconds
and
4
git commands to generate.