diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/tracefs.h | 45 | ||||
-rw-r--r-- | include/uapi/linux/magic.h | 2 |
2 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/tracefs.h b/include/linux/tracefs.h new file mode 100644 index 000000000000..5b727a17beee --- /dev/null +++ b/include/linux/tracefs.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * tracefs.h - a pseudo file system for activating tracing | ||
3 | * | ||
4 | * Based on debugfs by: 2004 Greg Kroah-Hartman <greg@kroah.com> | ||
5 | * | ||
6 | * Copyright (C) 2014 Red Hat Inc, author: Steven Rostedt <srostedt@redhat.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License version | ||
10 | * 2 as published by the Free Software Foundation. | ||
11 | * | ||
12 | * tracefs is the file system that is used by the tracing infrastructure. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef _TRACEFS_H_ | ||
17 | #define _TRACEFS_H_ | ||
18 | |||
19 | #include <linux/fs.h> | ||
20 | #include <linux/seq_file.h> | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | |||
24 | struct file_operations; | ||
25 | |||
26 | #ifdef CONFIG_TRACING | ||
27 | |||
28 | struct dentry *tracefs_create_file(const char *name, umode_t mode, | ||
29 | struct dentry *parent, void *data, | ||
30 | const struct file_operations *fops); | ||
31 | |||
32 | struct dentry *tracefs_create_dir(const char *name, struct dentry *parent); | ||
33 | |||
34 | void tracefs_remove(struct dentry *dentry); | ||
35 | void tracefs_remove_recursive(struct dentry *dentry); | ||
36 | |||
37 | struct dentry *tracefs_create_instance_dir(const char *name, struct dentry *parent, | ||
38 | int (*mkdir)(const char *name), | ||
39 | int (*rmdir)(const char *name)); | ||
40 | |||
41 | bool tracefs_initialized(void); | ||
42 | |||
43 | #endif /* CONFIG_TRACING */ | ||
44 | |||
45 | #endif | ||
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h index 7d664ea85ebd..7b1425a6b370 100644 --- a/include/uapi/linux/magic.h +++ b/include/uapi/linux/magic.h | |||
@@ -58,6 +58,8 @@ | |||
58 | 58 | ||
59 | #define STACK_END_MAGIC 0x57AC6E9D | 59 | #define STACK_END_MAGIC 0x57AC6E9D |
60 | 60 | ||
61 | #define TRACEFS_MAGIC 0x74726163 | ||
62 | |||
61 | #define V9FS_MAGIC 0x01021997 | 63 | #define V9FS_MAGIC 0x01021997 |
62 | 64 | ||
63 | #define BDEVFS_MAGIC 0x62646576 | 65 | #define BDEVFS_MAGIC 0x62646576 |