summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-24 01:33:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-24 01:33:39 +0000
commit09eefd2776748d8feba929ed6787ba4ecb478b8d (patch)
tree2a3d4c41e2119414c6c55cbaf69178bb9dfb562f /sys
parent54bf7132d3b23ce5d59b66b48364f75c8631b03b (diff)
deal with the 2340 lie in the right place, i think
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/atapi/acd.c6
-rw-r--r--sys/scsi/cd.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/atapi/acd.c b/sys/dev/atapi/acd.c
index 4e630eafdf8..7d4bbc93b7a 100644
--- a/sys/dev/atapi/acd.c
+++ b/sys/dev/atapi/acd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acd.c,v 1.17 1996/12/11 19:08:24 deraadt Exp $ */
+/* $OpenBSD: acd.c,v 1.18 1996/12/24 01:33:38 deraadt Exp $ */
/*
* Copyright (c) 1996 Manuel Bouyer. All rights reserved.
@@ -965,6 +965,8 @@ acdgetdisklabel(acd)
bzero(acd->sc_dk.dk_cpulabel, sizeof(struct cpu_disklabel));
lp->d_secsize = acd->params.blksize;
+ if (lp->d_secsize > 2048)
+ lp->d_secsize = 2048;
lp->d_ntracks = 1;
lp->d_nsectors = 100;
lp->d_ncylinders = (acd->params.disksize / 100) + 1;
@@ -1048,8 +1050,6 @@ acd_size(acd, flags)
ATAPI_DEBUG_PRINT(("acd_size: %ld %ld\n", acd->params.blksize,
acd->params.disksize));
- if (acd->params.blksize > 2048)
- acd->params.blksize = 2048;
return acd->params.disksize;
}
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 82a995b0a93..02e8273e751 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.18 1996/12/11 19:08:14 deraadt Exp $ */
+/* $OpenBSD: cd.c,v 1.19 1996/12/24 01:33:33 deraadt Exp $ */
/* $NetBSD: cd.c,v 1.92 1996/05/05 19:52:50 christos Exp $ */
/*
@@ -1053,6 +1053,8 @@ cdgetdisklabel(cd)
bzero(cd->sc_dk.dk_cpulabel, sizeof(struct cpu_disklabel));
lp->d_secsize = cd->params.blksize;
+ if (lp->d_secsize > 2048)
+ lp->d_secsize = 2048;
lp->d_ntracks = 1;
lp->d_nsectors = 100;
lp->d_ncylinders = (cd->params.disksize / 100) + 1;