diff options
-rw-r--r-- | sys/kern/vfs_conf.c | 14 | ||||
-rw-r--r-- | sys/kern/vfs_mount.c | 14 |
2 files changed, 26 insertions, 2 deletions
diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c index 56fb1b9..a42a89a 100644 --- a/sys/kern/vfs_conf.c +++ b/sys/kern/vfs_conf.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94 - * $Id: vfs_conf.c,v 1.20 1998/01/09 03:21:01 eivind Exp $ + * $Id: vfs_conf.c,v 1.21 1998/02/09 06:09:32 eivind Exp $ */ /* @@ -135,6 +135,18 @@ vfs_mountrootfs(void *unused) * Attempt the mount */ err = VFS_MOUNT(mp, NULL, NULL, NULL, p); + /* + * rootdev may be bogus (slice field may be incorrect for disks) + * If slice field is nonzero, clear and retry. + * + * XXX Implicit knowledge of device minor number layout. + * This is placeholder code until saner root mounts arrive with + * DEVFS. + */ + if ((err == ENXIO) && (rootdev & 0xff0000)) { + rootdev &= ~0xff0000; + err = VFS_MOUNT(mp, NULL, NULL, NULL, p); + } if (err) { vfs_unbusy(mp, p); /* diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 56fb1b9..a42a89a 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94 - * $Id: vfs_conf.c,v 1.20 1998/01/09 03:21:01 eivind Exp $ + * $Id: vfs_conf.c,v 1.21 1998/02/09 06:09:32 eivind Exp $ */ /* @@ -135,6 +135,18 @@ vfs_mountrootfs(void *unused) * Attempt the mount */ err = VFS_MOUNT(mp, NULL, NULL, NULL, p); + /* + * rootdev may be bogus (slice field may be incorrect for disks) + * If slice field is nonzero, clear and retry. + * + * XXX Implicit knowledge of device minor number layout. + * This is placeholder code until saner root mounts arrive with + * DEVFS. + */ + if ((err == ENXIO) && (rootdev & 0xff0000)) { + rootdev &= ~0xff0000; + err = VFS_MOUNT(mp, NULL, NULL, NULL, p); + } if (err) { vfs_unbusy(mp, p); /* |