--- zzzz-none-000/linux-2.4.17/fs/super.c 2001-12-21 17:42:03.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/fs/super.c 2004-11-24 13:22:16.000000000 +0000 @@ -15,7 +15,7 @@ * Added kerneld support: Jacques Gelinas and Bjorn Ekwall * Added change_root: Werner Almesberger & Hans Lermen, Feb '96 * Added options to /proc/mounts: - * Torbjörn Lindh (torbjorn.lindh@gopta.se), April 14, 1996. + * Torbj÷rn Lindh (torbjorn.lindh@gopta.se), April 14, 1996. * Added devfs support: Richard Gooch , 13-JAN-1998 * Heavily rewritten for 'one fs - one tree' dcache architecture. AV, Mar 2000 */ @@ -42,6 +42,8 @@ #define __NO_VERSION__ #include +#include + extern void wait_for_keypress(void); extern int root_mountflags; @@ -918,6 +920,7 @@ *s = '\0'; } + void __init mount_root(void) { struct nameidata root_nd; @@ -995,13 +998,21 @@ * Probably pure paranoia, but I'm less than happy about delving into * devfs crap and checking it right now. Later. */ - if (!ROOT_DEV) + if (!ROOT_DEV) { +#if defined(CONFIG_MIPS_AVALANCHE_ADAM2) || defined (CONFIG_MIPS_AVALANCHE_PSPBOOT) + adam2_env_set_variable("crash", ""); +#endif panic("I have no root and I want to scream"); + } retry: bdev = bdget(kdev_t_to_nr(ROOT_DEV)); - if (!bdev) + if (!bdev) { +#if defined(CONFIG_MIPS_AVALANCHE_ADAM2) || defined (CONFIG_MIPS_AVALANCHE_PSPBOOT) + adam2_env_set_variable("crash", ""); +#endif panic(__FUNCTION__ ": unable to allocate root device"); + } bdev->bd_op = devfs_get_ops (handle); /* Increments module use count */ path_start = devfs_generate_path (handle, path + 5, sizeof (path) - 5); mode = FMODE_READ; @@ -1021,6 +1032,9 @@ printk ("VFS: Cannot open root device \"%s\" or %s\n", root_device_name, kdevname (ROOT_DEV)); printk ("Please append a correct \"root=\" boot option\n"); +#if defined(CONFIG_MIPS_AVALANCHE_ADAM2) || defined (CONFIG_MIPS_AVALANCHE_PSPBOOT) + adam2_env_set_variable("crash", ""); +#endif panic("VFS: Unable to mount root fs on %s", kdevname(ROOT_DEV)); } @@ -1046,6 +1060,9 @@ goto mount_it; put_filesystem(fs_type); } +#if defined(CONFIG_MIPS_AVALANCHE_ADAM2) || defined (CONFIG_MIPS_AVALANCHE_PSPBOOT) + adam2_env_set_variable("crash", ""); +#endif panic("VFS: Unable to mount root fs on %s", kdevname(ROOT_DEV)); mount_it: @@ -1059,10 +1076,15 @@ devfs_mk_symlink (NULL, "root", DEVFS_FL_DEFAULT, name + 5, NULL, NULL); memcpy (name, "/dev/", 5); + printk("root device=%s\n", name); } vfsmnt = alloc_vfsmnt(); - if (!vfsmnt) + if (!vfsmnt) { +#if defined(CONFIG_MIPS_AVALANCHE_ADAM2) || defined (CONFIG_MIPS_AVALANCHE_PSPBOOT) + adam2_env_set_variable("crash", ""); +#endif panic("VFS: alloc_vfsmnt failed for root fs"); + } set_devname(vfsmnt, name); vfsmnt->mnt_sb = sb;