summaryrefslogtreecommitdiff
path: root/sys/arch/mvme68k
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-08-23 22:52:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-08-23 22:52:31 +0000
commiteff7224c2a5c269961e012d9ee9345d20dcac091 (patch)
treed3f19b4facc6360438e4082cae10569691abc940 /sys/arch/mvme68k
parentc766b9b2643ba983634351dc23324398f79d3fa8 (diff)
unify with mvme88k; miod ok
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r--sys/arch/mvme68k/mvme68k/autoconf.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/arch/mvme68k/mvme68k/autoconf.c b/sys/arch/mvme68k/mvme68k/autoconf.c
index 2c1a2f2a561..b17504e3aad 100644
--- a/sys/arch/mvme68k/mvme68k/autoconf.c
+++ b/sys/arch/mvme68k/mvme68k/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.22 2003/06/02 23:27:50 millert Exp $ */
+/* $OpenBSD: autoconf.c,v 1.23 2003/08/23 22:52:30 deraadt Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -260,7 +260,7 @@ swapconf()
for (swp = swdevt; swp->sw_dev != NODEV; swp++)
if (bdevsw[major(swp->sw_dev)].d_psize) {
nblks =
- (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
+ (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
if (nblks != -1 &&
(swp->sw_nblks == 0 || swp->sw_nblks > nblks))
swp->sw_nblks = nblks;
@@ -279,7 +279,7 @@ struct nam2blk {
} nam2blk[] = {
{ "sd", 4 },
{ "st", 7 },
- { "rd", 9 },
+ { "rd", 9 },
};
int
@@ -333,7 +333,7 @@ parsedisk(str, len, defpart, devp)
return (NULL);
cp = str + len - 1;
c = *cp;
- if (c >= 'a' && c <= 'h') {
+ if (c >= 'a' && (c - 'a') < MAXPARTITIONS) {
part = c - 'a';
*cp = '\0';
} else
@@ -385,7 +385,7 @@ setroot()
#endif
printf("boot device: %s\n",
- (bootdv) ? bootdv->dv_xname : "<unknown>");
+ (bootdv) ? bootdv->dv_xname : "<unknown>");
if (boothowto & RB_ASKNAME) {
for (;;) {
@@ -403,14 +403,14 @@ setroot()
if (len > 0 && buf[len - 1] == '*') {
buf[--len] = '\0';
dv = getdisk(buf, len, 1, &nrootdev);
- if (dv != NULL) {
+ if (dv) {
bootdv = dv;
nswapdev = nrootdev;
goto gotswap;
}
}
dv = getdisk(buf, len, 0, &nrootdev);
- if (dv != NULL) {
+ if (dv) {
bootdv = dv;
break;
}
@@ -460,9 +460,7 @@ gotswap:
dumpdev = nswapdev;
swdevt[0].sw_dev = nswapdev;
swdevt[1].sw_dev = NODEV;
-
} else if (mountroot == NULL) {
-
/*
* `swap generic': Use the device the ROM told us to use.
*/
@@ -488,9 +486,7 @@ gotswap:
}
swdevt[0].sw_dev = nswapdev;
swdevt[1].sw_dev = NODEV;
-
} else {
-
/*
* `root DEV swap DEV': honour rootdev/swdevt.
* rootdev/swdevt/mountroot already properly set.