0001
0002 #include <linux/kernel.h>
0003 #include <linux/blkdev.h>
0004 #include <linux/init.h>
0005 #include <linux/syscalls.h>
0006 #include <linux/unistd.h>
0007 #include <linux/slab.h>
0008 #include <linux/mount.h>
0009 #include <linux/major.h>
0010 #include <linux/root_dev.h>
0011 #include <linux/init_syscalls.h>
0012
0013 void mount_block_root(char *name, int flags);
0014 void mount_root(void);
0015 extern int root_mountflags;
0016
0017 static inline __init int create_dev(char *name, dev_t dev)
0018 {
0019 init_unlink(name);
0020 return init_mknod(name, S_IFBLK | 0600, new_encode_dev(dev));
0021 }
0022
0023 #ifdef CONFIG_BLK_DEV_RAM
0024
0025 int __init rd_load_disk(int n);
0026 int __init rd_load_image(char *from);
0027
0028 #else
0029
0030 static inline int rd_load_disk(int n) { return 0; }
0031 static inline int rd_load_image(char *from) { return 0; }
0032
0033 #endif
0034
0035 #ifdef CONFIG_BLK_DEV_INITRD
0036
0037 bool __init initrd_load(void);
0038
0039 #else
0040
0041 static inline bool initrd_load(void) { return false; }
0042
0043 #endif