summaryrefslogtreecommitdiff
path: root/sys/scsi/sd.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-04-25 00:38:17 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-04-25 00:38:17 +0000
commit0397475dceed1bbc11c572b9ec97d9a0142eedab (patch)
tree6e04ccdf05c7e0589fcaf8f604280666d9146a29 /sys/scsi/sd.c
parent871e2dd2236d18e2d7cabfab0fab7134cf61c8b0 (diff)
set d_bbsize and d_sbsize in spoofed label to values correct for ffs
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r--sys/scsi/sd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 94dc5733f81..ebbe07bddb7 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.27 1998/03/27 18:40:53 millert Exp $ */
+/* $OpenBSD: sd.c,v 1.28 1998/04/25 00:38:13 millert Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*
@@ -70,6 +70,8 @@
#include <scsi/scsi_disk.h>
#include <scsi/scsiconf.h>
+#include <ufs/ffs/fs.h> /* for BBSIZE and SBSIZE */
+
#define SDOUTSTANDING 4
#define SDRETRIES 4
@@ -415,7 +417,7 @@ sdclose(dev, flag, fmt, p)
sd->sc_dk.dk_openmask = sd->sc_dk.dk_copenmask | sd->sc_dk.dk_bopenmask;
if (sd->sc_dk.dk_openmask == 0) {
- /* XXXX Must wait for I/O to complete! */
+ /* XXX Must wait for I/O to complete! */
scsi_prevent(sd->sc_link, PR_ALLOW,
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY);
@@ -824,6 +826,10 @@ sdgetdisklabel(dev, sd)
lp->d_interleave = 1;
lp->d_flags = 0;
+ /* XXX - these values for BBSIZE and SBSIZE assume ffs */
+ lp->d_bbsize = BBSIZE;
+ lp->d_sbsize = SBSIZE;
+
lp->d_partitions[RAW_PART].p_offset = 0;
lp->d_partitions[RAW_PART].p_size =
lp->d_secperunit * (lp->d_secsize / DEV_BSIZE);