diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-03-17 14:16:05 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-03-17 14:16:05 +0000 |
commit | c0b177fe05a7f10e70abcee079533145eb5dba77 (patch) | |
tree | 5024a4b2ec5e40cfa4d78ab902ed2c2a862cfb12 /sys/arch/macppc | |
parent | e3f80c61b9b14ab0c39013d4206080bf56751949 (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/macppc')
-rw-r--r-- | sys/arch/macppc/macppc/disksubr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c index 7ebc1e556f9..543bf37d141 100644 --- a/sys/arch/macppc/macppc/disksubr.c +++ b/sys/arch/macppc/macppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.9 2003/10/16 05:03:22 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.10 2004/03/17 14:16:04 miod Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -87,7 +87,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), /* minimal requirements for archtypal 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; |