diff options
Diffstat (limited to 'include/linux/devfs_fs_kernel.h')
-rw-r--r-- | include/linux/devfs_fs_kernel.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h new file mode 100644 index 000000000000..89810e73d256 --- /dev/null +++ b/include/linux/devfs_fs_kernel.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef _LINUX_DEVFS_FS_KERNEL_H | ||
2 | #define _LINUX_DEVFS_FS_KERNEL_H | ||
3 | |||
4 | #include <linux/fs.h> | ||
5 | #include <linux/config.h> | ||
6 | #include <linux/spinlock.h> | ||
7 | #include <linux/types.h> | ||
8 | |||
9 | #include <asm/semaphore.h> | ||
10 | |||
11 | #define DEVFS_SUPER_MAGIC 0x1373 | ||
12 | |||
13 | #ifdef CONFIG_DEVFS_FS | ||
14 | extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) | ||
15 | __attribute__ ((format(printf, 3, 4))); | ||
16 | extern int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) | ||
17 | __attribute__ ((format(printf, 3, 4))); | ||
18 | extern int devfs_mk_symlink(const char *name, const char *link); | ||
19 | extern int devfs_mk_dir(const char *fmt, ...) | ||
20 | __attribute__ ((format(printf, 1, 2))); | ||
21 | extern void devfs_remove(const char *fmt, ...) | ||
22 | __attribute__ ((format(printf, 1, 2))); | ||
23 | extern int devfs_register_tape(const char *name); | ||
24 | extern void devfs_unregister_tape(int num); | ||
25 | extern void mount_devfs_fs(void); | ||
26 | #else /* CONFIG_DEVFS_FS */ | ||
27 | static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) | ||
28 | { | ||
29 | return 0; | ||
30 | } | ||
31 | static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) | ||
32 | { | ||
33 | return 0; | ||
34 | } | ||
35 | static inline int devfs_mk_symlink(const char *name, const char *link) | ||
36 | { | ||
37 | return 0; | ||
38 | } | ||
39 | static inline int devfs_mk_dir(const char *fmt, ...) | ||
40 | { | ||
41 | return 0; | ||
42 | } | ||
43 | static inline void devfs_remove(const char *fmt, ...) | ||
44 | { | ||
45 | } | ||
46 | static inline int devfs_register_tape(const char *name) | ||
47 | { | ||
48 | return -1; | ||
49 | } | ||
50 | static inline void devfs_unregister_tape(int num) | ||
51 | { | ||
52 | } | ||
53 | static inline void mount_devfs_fs(void) | ||
54 | { | ||
55 | return; | ||
56 | } | ||
57 | #endif /* CONFIG_DEVFS_FS */ | ||
58 | #endif /* _LINUX_DEVFS_FS_KERNEL_H */ | ||