Add syscall inout table
[lttng-modules.git] / lttng-abi.c
index 261a0ad3f8a1bf0ae4af6e76c9a2a246115589b4..02918114252d76071d9c51786f9aa955ad9fdeab 100644 (file)
@@ -841,6 +841,7 @@ int lttng_abi_open_metadata_stream(struct file *channel_file)
        metadata_stream->priv = buf;
        stream_priv = metadata_stream;
        metadata_stream->transport = channel->transport;
+       mutex_init(&metadata_stream->lock);
 
        /*
         * Since life-time of metadata cache differs from that of
@@ -924,15 +925,23 @@ int lttng_abi_create_event(struct file *channel_file,
                atomic_long_inc(&channel_file->f_count);
                break;
        case LTTNG_KERNEL_SYSCALL:
-               /*
-                * Only all-syscall tracing supported for now.
-                */
-               if (event_param->name[0] != '\0')
-                       return -EINVAL;
                ret = lttng_syscalls_register(channel, NULL);
                if (ret)
                        goto fd_error;
                event_fd = 0;
+               if (event_param->u.syscall.disable) {
+                       ret = lttng_syscall_filter_disable(channel,
+                               event_param->name[0] == '\0' ?
+                                       NULL : event_param->name);
+                       if (ret)
+                               goto fd_error;
+               } else {
+                       ret = lttng_syscall_filter_enable(channel,
+                               event_param->name[0] == '\0' ?
+                                       NULL : event_param->name);
+                       if (ret)
+                               goto fd_error;
+               }
                break;
        }
        return event_fd;
@@ -1555,7 +1564,8 @@ error:
        return ret;
 }
 
-void __exit lttng_abi_exit(void)
+/* No __exit annotation because used by init error path too. */
+void lttng_abi_exit(void)
 {
        if (lttng_proc_dentry)
                remove_proc_entry("lttng", NULL);
This page took 0.024111 seconds and 4 git commands to generate.