summaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
commit482368b1a8e45430672c58c9a42e7d2004367126 (patch)
treece2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /init/main.c
parente4d0251c6f56ab2e191afb70f80f382793e23f74 (diff)
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c22
1 files changed, 22 insertions, 0 deletions
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 <linux/config.h>
#include <linux/proc_fs.h>
+#include <linux/devfs_fs_kernel.h>
#include <linux/unistd.h>
#include <linux/string.h>
#include <linux/ctype.h>
@@ -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