summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-03-17 14:16:05 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-03-17 14:16:05 +0000
commitc0b177fe05a7f10e70abcee079533145eb5dba77 (patch)
tree5024a4b2ec5e40cfa4d78ab902ed2c2a862cfb12 /sys/arch/mvme88k
parente3f80c61b9b14ab0c39013d4206080bf56751949 (diff)
Make sure disklabels use at least DEV_BSIZE as their sector size.
This allows the kernel to survive reading the disklabel off a 256-bytes/sector scsi device... ok deraadt@
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/mvme88k/disksubr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c
index c0ed981dc5e..18c2ce788c5 100644
--- a/sys/arch/mvme88k/mvme88k/disksubr.c
+++ b/sys/arch/mvme88k/mvme88k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.24 2004/01/12 17:30:26 miod Exp $ */
+/* $OpenBSD: disksubr.c,v 1.25 2004/03/17 14:16:04 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1995 Dale Rahn.
@@ -137,7 +137,7 @@ readdisklabel(dev, strat, lp, clp, spoofonly)
int error, i;
/* minimal requirements for archetypal disk label */
- if (lp->d_secsize == 0)
+ if (lp->d_secsize < DEV_BSIZE)
lp->d_secsize = DEV_BSIZE;
if (lp->d_secperunit == 0)
lp->d_secperunit = 0x1fffffff;