projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove warnings
[lttng-modules.git]
/
ltt-debugfs-abi.c
diff --git
a/ltt-debugfs-abi.c
b/ltt-debugfs-abi.c
index cfc364a844635f1476a17e7e7c794b73478f6017..fe5f5b1b354310ea0c083cb53c3504aae7c875c9 100644
(file)
--- a/
ltt-debugfs-abi.c
+++ b/
ltt-debugfs-abi.c
@@
-247,7
+247,6
@@
void lttng_metadata_create_events(struct file *channel_file)
.name = "lttng_metadata",
};
struct ltt_event *event;
.name = "lttng_metadata",
};
struct ltt_event *event;
- int ret;
/*
* We tolerate no failure path after event creation. It will stay
/*
* We tolerate no failure path after event creation. It will stay
@@
-255,7
+254,6
@@
void lttng_metadata_create_events(struct file *channel_file)
*/
event = ltt_event_create(channel, &metadata_params, NULL);
if (!event) {
*/
event = ltt_event_create(channel, &metadata_params, NULL);
if (!event) {
- ret = -EINVAL;
goto create_error;
}
return;
goto create_error;
}
return;
@@
-271,7
+269,7
@@
int lttng_abi_create_channel(struct file *session_file,
enum channel_type channel_type)
{
struct ltt_session *session = session_file->private_data;
enum channel_type channel_type)
{
struct ltt_session *session = session_file->private_data;
- const struct file_operations *fops;
+ const struct file_operations *fops
= NULL
;
const char *transport_name;
struct ltt_channel *chan;
struct file *chan_file;
const char *transport_name;
struct ltt_channel *chan;
struct file *chan_file;
@@
-286,8
+284,17
@@
int lttng_abi_create_channel(struct file *session_file,
ret = chan_fd;
goto fd_error;
}
ret = chan_fd;
goto fd_error;
}
+ switch (channel_type) {
+ case PER_CPU_CHANNEL:
+ fops = <tng_channel_fops;
+ break;
+ case METADATA_CHANNEL:
+ fops = <tng_metadata_fops;
+ break;
+ }
+
chan_file = anon_inode_getfile("[lttng_channel]",
chan_file = anon_inode_getfile("[lttng_channel]",
-
<tng_channel_
fops,
+ fops,
NULL, O_RDWR);
if (IS_ERR(chan_file)) {
ret = PTR_ERR(chan_file);
NULL, O_RDWR);
if (IS_ERR(chan_file)) {
ret = PTR_ERR(chan_file);
@@
-304,7
+311,6
@@
int lttng_abi_create_channel(struct file *session_file,
} else {
return -EINVAL;
}
} else {
return -EINVAL;
}
- fops = <tng_channel_fops;
break;
case METADATA_CHANNEL:
if (chan_param.output == LTTNG_KERNEL_SPLICE)
break;
case METADATA_CHANNEL:
if (chan_param.output == LTTNG_KERNEL_SPLICE)
@@
-313,7
+319,6
@@
int lttng_abi_create_channel(struct file *session_file,
transport_name = "relay-metadata-mmap";
else
return -EINVAL;
transport_name = "relay-metadata-mmap";
else
return -EINVAL;
- fops = <tng_metadata_fops;
break;
default:
transport_name = "<unknown>";
break;
default:
transport_name = "<unknown>";
This page took
0.024617 seconds
and
4
git commands to generate.