Linux-2.6.12-rc2
[linux-2.6/next.git] / include / linux / devfs_fs_kernel.h
blob89810e73d2569a066b5680dd015c10a98626c030
1 #ifndef _LINUX_DEVFS_FS_KERNEL_H
2 #define _LINUX_DEVFS_FS_KERNEL_H
4 #include <linux/fs.h>
5 #include <linux/config.h>
6 #include <linux/spinlock.h>
7 #include <linux/types.h>
9 #include <asm/semaphore.h>
11 #define DEVFS_SUPER_MAGIC 0x1373
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, ...)
29 return 0;
31 static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
33 return 0;
35 static inline int devfs_mk_symlink(const char *name, const char *link)
37 return 0;
39 static inline int devfs_mk_dir(const char *fmt, ...)
41 return 0;
43 static inline void devfs_remove(const char *fmt, ...)
46 static inline int devfs_register_tape(const char *name)
48 return -1;
50 static inline void devfs_unregister_tape(int num)
53 static inline void mount_devfs_fs(void)
55 return;
57 #endif /* CONFIG_DEVFS_FS */
58 #endif /* _LINUX_DEVFS_FS_KERNEL_H */