summaryrefslogtreecommitdiff
path: root/sys/arch/vax/vsa/hdc9224.c
diff options
context:
space:
mode:
authorMats O Jansson <maja@cvs.openbsd.org>1997-09-10 12:08:38 +0000
committerMats O Jansson <maja@cvs.openbsd.org>1997-09-10 12:08:38 +0000
commit5b8c56d2d4d1cbe470de1821d8dbf0a09be7cfa4 (patch)
treec4fabae6d813ad8f61e4144364980154cc9c452a /sys/arch/vax/vsa/hdc9224.c
parent527830974744f2a3c3c81d19d69b2036823ea766 (diff)
Sync with NetBSD 970516. -moj
Diffstat (limited to 'sys/arch/vax/vsa/hdc9224.c')
-rw-r--r--sys/arch/vax/vsa/hdc9224.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c
index 17b27fd2c3e..e97f9f25850 100644
--- a/sys/arch/vax/vsa/hdc9224.c
+++ b/sys/arch/vax/vsa/hdc9224.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: hdc9224.c,v 1.2 1997/05/29 00:05:32 niklas Exp $ */
-/* $NetBSD: hdc9224.c,v 1.4 1996/10/13 03:36:11 christos Exp $ */
+/* $OpenBSD: hdc9224.c,v 1.3 1997/09/10 12:08:36 maja Exp $ */
+/* $NetBSD: hdc9224.c,v 1.6 1997/03/15 16:32:22 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -71,6 +71,7 @@ static int keepLock = 0;
#include <sys/disklabel.h>
#include <sys/disk.h>
#include <sys/syslog.h>
+#include <sys/reboot.h>
#include <machine/pte.h>
#include <machine/sid.h>
@@ -78,6 +79,7 @@ static int keepLock = 0;
#include <machine/uvax.h>
#include <machine/ka410.h>
#include <machine/vsbus.h>
+#include <machine/rpb.h>
#include <vax/vsa/hdc9224.h>
@@ -392,6 +394,11 @@ rdattach(parent, self, aux)
rp->diskname, rp->diskblks/2048, rp->disklbns,
rp->cylinders, rp->heads, rp->sectors);
}
+ /*
+ * Know where we booted from.
+ */
+ if ((B_TYPE(bootdev) == BDEV_RD) && (rd->sc_drive == B_UNIT(bootdev)))
+ booted_from = self;
}
/*
@@ -422,10 +429,9 @@ rdstrategy(bp)
*/
/*------------------------------*/
blkno = bp->b_blkno / (rd->sc_dk.dk_label->d_secsize / DEV_BSIZE);
- if (HDCPART(bp->b_dev) != RAW_PART) {
- p = &rd->sc_dk.dk_label->d_partitions[HDCPART(bp->b_dev)];
- blkno += p->p_offset;
- }
+ p = &rd->sc_dk.dk_label->d_partitions[HDCPART(bp->b_dev)];
+ blkno += p->p_offset;
+
/* nblks = howmany(bp->b_bcount, sd->sc_dk.dk_label->d_secsize); */
if (hdc_strategy(hdc, rd, HDCUNIT(bp->b_dev),
@@ -1141,5 +1147,4 @@ hdc_select(sc, unit)
return (error);
}
-
#endif /* NHDC > 0 */