blob: 89810e73d2569a066b5680dd015c10a98626c030 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#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
14extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
15 __attribute__ ((format(printf, 3, 4)));
16extern int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
17 __attribute__ ((format(printf, 3, 4)));
18extern int devfs_mk_symlink(const char *name, const char *link);
19extern int devfs_mk_dir(const char *fmt, ...)
20 __attribute__ ((format(printf, 1, 2)));
21extern void devfs_remove(const char *fmt, ...)
22 __attribute__ ((format(printf, 1, 2)));
23extern int devfs_register_tape(const char *name);
24extern void devfs_unregister_tape(int num);
25extern void mount_devfs_fs(void);
26#else /* CONFIG_DEVFS_FS */
27static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
28{
29 return 0;
30}
31static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
32{
33 return 0;
34}
35static inline int devfs_mk_symlink(const char *name, const char *link)
36{
37 return 0;
38}
39static inline int devfs_mk_dir(const char *fmt, ...)
40{
41 return 0;
42}
43static inline void devfs_remove(const char *fmt, ...)
44{
45}
46static inline int devfs_register_tape(const char *name)
47{
48 return -1;
49}
50static inline void devfs_unregister_tape(int num)
51{
52}
53static inline void mount_devfs_fs(void)
54{
55 return;
56}
57#endif /* CONFIG_DEVFS_FS */
58#endif /* _LINUX_DEVFS_FS_KERNEL_H */