mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
tracefs: Add directory /sys/kernel/tracing
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>
This commit is contained in:
parent
f76180bc07
commit
cc31004a4a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user