1 #ifndef _LINUX_DEVFS_FS_KERNEL_H
2 #define _LINUX_DEVFS_FS_KERNEL_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
, ...)
31 static inline int devfs_mk_cdev(dev_t dev
, umode_t mode
, const char *fmt
, ...)
35 static inline int devfs_mk_symlink(const char *name
, const char *link
)
39 static inline int devfs_mk_dir(const char *fmt
, ...)
43 static inline void devfs_remove(const char *fmt
, ...)
46 static inline int devfs_register_tape(const char *name
)
50 static inline void devfs_unregister_tape(int num
)
53 static inline void mount_devfs_fs(void)
57 #endif /* CONFIG_DEVFS_FS */
58 #endif /* _LINUX_DEVFS_FS_KERNEL_H */