lttng_abi_create_stream_fd: expect fd name as parameter
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 3 Feb 2020 19:17:53 +0000 (14:17 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 18 Nov 2020 18:01:52 +0000 (13:01 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ic9711863b58307d3ed6cc782efc78e4f59345950

src/lttng-abi.c

index 44e000b839d7a7dbb6007c00f5a9616e8ab88600..3bc2d1fb7c3df1a979ef1992f14554079dbddff3 100644 (file)
@@ -1140,7 +1140,7 @@ const struct file_operations lttng_metadata_ring_buffer_file_operations = {
 
 static
 int lttng_abi_create_stream_fd(struct file *channel_file, void *stream_priv,
-               const struct file_operations *fops)
+               const struct file_operations *fops, const char *name)
 {
        int stream_fd, ret;
        struct file *stream_file;
@@ -1150,8 +1150,7 @@ int lttng_abi_create_stream_fd(struct file *channel_file, void *stream_priv,
                ret = stream_fd;
                goto fd_error;
        }
-       stream_file = anon_inode_getfile("[lttng_stream]", fops,
-                       stream_priv, O_RDWR);
+       stream_file = anon_inode_getfile(name, fops, stream_priv, O_RDWR);
        if (IS_ERR(stream_file)) {
                ret = PTR_ERR(stream_file);
                goto file_error;
@@ -1190,7 +1189,8 @@ int lttng_abi_open_stream(struct file *channel_file)
 
        stream_priv = buf;
        ret = lttng_abi_create_stream_fd(channel_file, stream_priv,
-                       &lttng_stream_ring_buffer_file_operations);
+                       &lttng_stream_ring_buffer_file_operations,
+                       "[lttng_stream]");
        if (ret < 0)
                goto fd_error;
 
@@ -1245,7 +1245,8 @@ int lttng_abi_open_metadata_stream(struct file *channel_file)
        }
 
        ret = lttng_abi_create_stream_fd(channel_file, stream_priv,
-                       &lttng_metadata_ring_buffer_file_operations);
+                       &lttng_metadata_ring_buffer_file_operations,
+                       "[lttng_metadata_stream]");
        if (ret < 0)
                goto fd_error;
 
This page took 0.028466 seconds and 4 git commands to generate.