diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-01-04 12:59:50 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-01-04 12:59:50 +0000 |
commit | d8753666de4bed628303ceeecc2cb9495316f902 (patch) | |
tree | 39ac2784b57913f402a4c4345b0df6e34d8b8216 /sys/arch | |
parent | 6d0790521118ebde3798c1c45860e2197d39e9d5 (diff) |
Print warning when not recognizing the boot device.
Also get the partition number from the BIOS when building bootdev.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arc/arc/autoconf.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/arch/arc/arc/autoconf.c b/sys/arch/arc/arc/autoconf.c index 1071f289e98..fa66ba531ec 100644 --- a/sys/arch/arc/arc/autoconf.c +++ b/sys/arch/arc/arc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.5 1996/11/12 08:11:08 niklas Exp $ */ +/* $OpenBSD: autoconf.c,v 1.6 1997/01/04 12:59:49 niklas Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom * Copyright (c) 1995 Theo de Raadt @@ -41,7 +41,7 @@ * from: Utah Hdr: autoconf.c 1.31 91/01/21 * * from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93 - * $Id: autoconf.c,v 1.5 1996/11/12 08:11:08 niklas Exp $ + * $Id: autoconf.c,v 1.6 1997/01/04 12:59:49 niklas Exp $ */ /* @@ -239,7 +239,7 @@ setroot() if (boothowto & RB_ASKNAME) { for (;;) { - printf("root device "); + printf("root device "); if (bootdv != NULL) printf("(default %s%c)", bootdv->dv_xname, @@ -449,12 +449,18 @@ makebootdev(cp) break; dp++; } - if (!dp) + if (!dp->attachment) { + printf("Warning: boot device unrecognized: %s\n", cp); return; + } ctrl = getpno(&cp); if(*cp++ == ')') unit = getpno(&cp); - sprintf(bootdev, "%s%d", dp->dev, ctrl*16 + unit); + if(*cp++ == ')') + getpno(&cp); + if(*cp++ == ')') + part = getpno(&cp) - 1; + sprintf(bootdev, "%s%d%c", dp->dev, ctrl*16 + unit, 'a' + part); } getpno(cp) |