lkml.org 
[lkml]   [2015]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 4/5 v4] tracefs: Add directory /sys/kernel/tracing
    From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

    When tracefs is configured, have the directory /sys/kernel/tracing appear
    just like /sys/kernel/debug appears when debugfs is configured.

    This will give a consistent place for system admins to mount tracefs.

    Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    ---
    fs/tracefs/inode.c | 7 +++++++
    1 file changed, 7 insertions(+)

    diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
    index 5b1547a452d8..0b9cf5cf24c9 100644
    --- a/fs/tracefs/inode.c
    +++ b/fs/tracefs/inode.c
    @@ -16,6 +16,7 @@
    #include <linux/module.h>
    #include <linux/fs.h>
    #include <linux/mount.h>
    +#include <linux/kobject.h>
    #include <linux/namei.h>
    #include <linux/tracefs.h>
    #include <linux/fsnotify.h>
    @@ -509,10 +510,16 @@ bool tracefs_initialized(void)
    return tracefs_registered;
    }

    +static struct kobject *trace_kobj;
    +
    static int __init tracefs_init(void)
    {
    int retval;

    + trace_kobj = kobject_create_and_add("tracing", kernel_kobj);
    + if (!trace_kobj)
    + return -EINVAL;
    +
    retval = register_filesystem(&trace_fs_type);
    if (!retval)
    tracefs_registered = true;
    --
    2.1.4



    \
     
     \ /
      Last update: 2015-02-02 17:01    [W:3.202 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site