summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-06-08 15:34:06 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-06-08 15:34:06 +0000
commit2cb35ab19a688b512d5a0950b192a70e04bc926c (patch)
treea4f7d345c6d4bc09c78142de70c2b2d30a9def06 /sys/arch
parentf75f414ed3e5f3a3bb1d7a058e3093d93571ef77 (diff)
instead of reading past the end of the sun_fstypes array
assume FS_BSDFFS for partitions 8-15 in extended sun labels as suggested by deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/stand/ofwboot/ofdev.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/arch/sparc64/stand/ofwboot/ofdev.c b/sys/arch/sparc64/stand/ofwboot/ofdev.c
index 877be513793..3a54e9ffb91 100644
--- a/sys/arch/sparc64/stand/ofwboot/ofdev.c
+++ b/sys/arch/sparc64/stand/ofwboot/ofdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofdev.c,v 1.20 2013/11/05 00:51:58 krw Exp $ */
+/* $OpenBSD: ofdev.c,v 1.21 2014/06/08 15:34:05 jsg Exp $ */
/* $NetBSD: ofdev.c,v 1.1 2000/08/20 14:58:41 mrg Exp $ */
/*
@@ -339,12 +339,10 @@ disklabel_sun_to_bsd(struct sun_disklabel *sl, struct disklabel *lp)
npp->p_fstype = FS_UNUSED;
continue;
}
- npp->p_fstype = sun_fstypes[i+8];
- if (npp->p_fstype == FS_BSDFFS) {
- npp->p_fragblock =
- DISKLABELV1_FFS_FRAGBLOCK(2048, 8);
- npp->p_cpg = 16;
- }
+ npp->p_fstype = FS_BSDFFS;
+ npp->p_fragblock =
+ DISKLABELV1_FFS_FRAGBLOCK(2048, 8);
+ npp->p_cpg = 16;
}
if (sl->sl_xpmag == SL_XPMAGTYP) {
for (i = 0; i < MAXPARTITIONS; i++) {