Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/arch/arm/arm Pull up following revision(s) (requested...
details: https://anonhg.NetBSD.org/src/rev/2d411ff50fb9
branches: netbsd-6
changeset: 775382:2d411ff50fb9
user: riz <riz%NetBSD.org@localhost>
date: Tue Oct 23 16:21:32 2012 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #617):
sys/arch/arm/arm/disksubr_mbr.c: revision 1.14
Fix a bug that armeb machine misunderstand MBR partition's offset
and size. Fixes PR#47081
diffstat:
sys/arch/arm/arm/disksubr_mbr.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (56 lines):
diff -r 0d30c5b24bc4 -r 2d411ff50fb9 sys/arch/arm/arm/disksubr_mbr.c
--- a/sys/arch/arm/arm/disksubr_mbr.c Tue Oct 23 16:19:47 2012 +0000
+++ b/sys/arch/arm/arm/disksubr_mbr.c Tue Oct 23 16:21:32 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr_mbr.c,v 1.13 2011/12/02 00:25:37 jakllsch Exp $ */
+/* $NetBSD: disksubr_mbr.c,v 1.13.4.1 2012/10/23 16:21:32 riz Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr_mbr.c,v 1.13 2011/12/02 00:25:37 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr_mbr.c,v 1.13.4.1 2012/10/23 16:21:32 riz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -151,23 +151,23 @@
/* Install in partition e, f, g, or h. */
pp = &lp->d_partitions['e' - 'a' + i];
- pp->p_offset = mbrp->mbrp_start;
- pp->p_size = mbrp->mbrp_size;
+ pp->p_offset = le32toh(mbrp->mbrp_start);
+ pp->p_size = le32toh(mbrp->mbrp_size);
pp->p_fstype = xlat_mbr_fstype(mbrp->mbrp_type);
/* is this ours? */
if (mbrp == ourmbrp) {
/* need sector address for SCSI/IDE,
cylinder for ESDI/ST506/RLL */
- mbrpartoff = mbrp->mbrp_start;
+ mbrpartoff = le32toh(mbrp->mbrp_start);
cyl = MBR_PCYL(mbrp->mbrp_scyl, mbrp->mbrp_ssect);
#ifdef __i386__ /* XXX? */
/* update disklabel with details */
lp->d_partitions[2].p_size =
- mbrp->mbrp_size;
+ le32toh(mbrp->mbrp_size);
lp->d_partitions[2].p_offset =
- mbrp->mbrp_start;
+ le32toh(mbrp->mbrp_start);
lp->d_ntracks = mbrp->mbrp_ehd + 1;
lp->d_nsectors = MBR_PSECT(mbrp->mbrp_esect);
lp->d_secpercyl =
@@ -250,7 +250,7 @@
}
/* need sector address for SCSI/IDE, cylinder for ESDI/ST506/RLL */
- mbrpartoff = ourmbrp->mbrp_start;
+ mbrpartoff = le32toh(ourmbrp->mbrp_start);
cyl = MBR_PCYL(ourmbrp->mbrp_scyl, ourmbrp->mbrp_ssect);
*cylp = cyl;
Home |
Main Index |
Thread Index |
Old Index