From 482368b1a8e45430672c58c9a42e7d2004367126 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 24 Feb 2000 00:12:35 +0000 Subject: Merge with 2.3.47. Guys, this is buggy as shit. You've been warned. --- init/main.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'init') diff --git a/init/main.c b/init/main.c index c7eabdcc8..5ae3597e4 100644 --- a/init/main.c +++ b/init/main.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -92,6 +93,7 @@ extern void filescache_init(void); extern void signals_init(void); extern void bdev_init(void); extern int init_pcmcia_ds(void); +extern int usb_init(void); extern void free_initmem(void); extern void filesystem_setup(void); @@ -130,6 +132,8 @@ kdev_t real_root_dev; int root_mountflags = MS_RDONLY; char *execute_command = NULL; +char root_device_name[64]; + static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, }; static char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; @@ -257,6 +261,7 @@ static struct dev_name_struct { kdev_t __init name_to_kdev_t(char *line) { int base = 0; + if (strncmp(line,"/dev/",5) == 0) { struct dev_name_struct *dev = root_dev_names; line += 5; @@ -275,7 +280,18 @@ kdev_t __init name_to_kdev_t(char *line) static int __init root_dev_setup(char *line) { + int i; + char ch; + ROOT_DEV = name_to_kdev_t(line); + memset (root_device_name, 0, sizeof root_device_name); + if (strncmp (line, "/dev/", 5) == 0) line += 5; + for (i = 0; i < sizeof root_device_name - 1; ++i) + { + ch = line[i]; + if ( isspace (ch) || (ch == ',') || (ch == '\0') ) break; + root_device_name[i] = ch; + } return 1; } @@ -659,6 +675,10 @@ static void __init do_basic_setup(void) #ifdef CONFIG_ISAPNP isapnp_init(); #endif +#ifdef CONFIG_USB + usb_init(); /* Do this before doing initcalls, so that we can make + usbcore initialize here, and all drivers initialize later */ +#endif #ifdef CONFIG_TC tc_init(); #endif @@ -687,6 +707,8 @@ static void __init do_basic_setup(void) /* Mount the root filesystem.. */ mount_root(); + mount_devfs_fs (); + #ifdef CONFIG_BLK_DEV_INITRD root_mountflags = real_root_mountflags; if (mount_initrd && ROOT_DEV != real_root_dev -- cgit v1.2.3