| .. | .. |
|---|
| 8 | 8 | #include <linux/mount.h> |
|---|
| 9 | 9 | #include <linux/major.h> |
|---|
| 10 | 10 | #include <linux/root_dev.h> |
|---|
| 11 | +#include <linux/init_syscalls.h> |
|---|
| 11 | 12 | |
|---|
| 12 | | -void change_floppy(char *fmt, ...); |
|---|
| 13 | 13 | void mount_block_root(char *name, int flags); |
|---|
| 14 | 14 | void mount_root(void); |
|---|
| 15 | 15 | extern int root_mountflags; |
|---|
| 16 | 16 | |
|---|
| 17 | | -static inline int create_dev(char *name, dev_t dev) |
|---|
| 17 | +static inline __init int create_dev(char *name, dev_t dev) |
|---|
| 18 | 18 | { |
|---|
| 19 | | - ksys_unlink(name); |
|---|
| 20 | | - return ksys_mknod(name, S_IFBLK|0600, new_encode_dev(dev)); |
|---|
| 21 | | -} |
|---|
| 22 | | - |
|---|
| 23 | | -static inline u32 bstat(char *name) |
|---|
| 24 | | -{ |
|---|
| 25 | | - struct kstat stat; |
|---|
| 26 | | - if (vfs_stat(name, &stat) != 0) |
|---|
| 27 | | - return 0; |
|---|
| 28 | | - if (!S_ISBLK(stat.mode)) |
|---|
| 29 | | - return 0; |
|---|
| 30 | | - return stat.rdev; |
|---|
| 19 | + init_unlink(name); |
|---|
| 20 | + return init_mknod(name, S_IFBLK | 0600, new_encode_dev(dev)); |
|---|
| 31 | 21 | } |
|---|
| 32 | 22 | |
|---|
| 33 | 23 | #ifdef CONFIG_BLK_DEV_RAM |
|---|
| .. | .. |
|---|
| 49 | 39 | #else |
|---|
| 50 | 40 | |
|---|
| 51 | 41 | static inline bool initrd_load(void) { return false; } |
|---|
| 52 | | - |
|---|
| 53 | | -#endif |
|---|
| 54 | | - |
|---|
| 55 | | -#ifdef CONFIG_BLK_DEV_MD |
|---|
| 56 | | - |
|---|
| 57 | | -void md_run_setup(void); |
|---|
| 58 | | - |
|---|
| 59 | | -#else |
|---|
| 60 | | - |
|---|
| 61 | | -static inline void md_run_setup(void) {} |
|---|
| 62 | 42 | |
|---|
| 63 | 43 | #endif |
|---|