summaryrefslogtreecommitdiff
path: root/sys/arch/arm/arm/disksubr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/arm/arm/disksubr.c')
-rw-r--r--sys/arch/arm/arm/disksubr.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/sys/arch/arm/arm/disksubr.c b/sys/arch/arm/arm/disksubr.c
index ed3913170a5..e9612677767 100644
--- a/sys/arch/arm/arm/disksubr.c
+++ b/sys/arch/arm/arm/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.8 2006/03/15 20:20:39 miod Exp $ */
+/* $OpenBSD: disksubr.c,v 1.9 2006/07/01 16:50:32 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -132,17 +132,17 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
/* Search for our MBR partition */
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1;
i++, dp2++)
- if (get_le(&dp2->dp_size) &&
+ if (letoh32(dp2->dp_size) &&
dp2->dp_typ == DOSPTYP_OPENBSD)
ourpart = i;
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1;
i++, dp2++)
- if (get_le(&dp2->dp_size) &&
+ if (letoh32(dp2->dp_size) &&
dp2->dp_typ == DOSPTYP_FREEBSD)
ourpart = i;
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1;
i++, dp2++)
- if (get_le(&dp2->dp_size) &&
+ if (letoh32(dp2->dp_size) &&
dp2->dp_typ == DOSPTYP_NETBSD)
ourpart = i;
if (ourpart == -1)
@@ -152,13 +152,13 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
* for SCSI/IDE, cylinder for ESDI/ST506/RLL
*/
dp2 = &dp[ourpart];
- dospartoff = get_le(&dp2->dp_start) + part_blkno;
+ dospartoff = letoh32(dp2->dp_start) + part_blkno;
cyl = DPCYL(dp2->dp_scyl, dp2->dp_ssect);
/* XXX build a temporary disklabel */
- lp->d_partitions[0].p_size = get_le(&dp2->dp_size);
+ lp->d_partitions[0].p_size = letoh32(dp2->dp_size);
lp->d_partitions[0].p_offset =
- get_le(&dp2->dp_start) + part_blkno;
+ letoh32(dp2->dp_start) + part_blkno;
if (lp->d_ntracks == 0)
lp->d_ntracks = dp2->dp_ehd + 1;
if (lp->d_nsectors == 0)
@@ -177,13 +177,13 @@ donot:
if (dp2->dp_typ == DOSPTYP_OPENBSD)
continue;
- if (get_le(&dp2->dp_size) > lp->d_secperunit)
+ if (letoh32(dp2->dp_size) > lp->d_secperunit)
continue;
- if (get_le(&dp2->dp_size))
- pp->p_size = get_le(&dp2->dp_size);
- if (get_le(&dp2->dp_start))
+ if (letoh32(dp2->dp_size))
+ pp->p_size = letoh32(dp2->dp_size);
+ if (letoh32(dp2->dp_start))
pp->p_offset =
- get_le(&dp2->dp_start) + part_blkno;
+ letoh32(dp2->dp_start) + part_blkno;
switch (dp2->dp_typ) {
case DOSPTYP_UNUSED:
@@ -217,9 +217,9 @@ donot:
break;
case DOSPTYP_EXTEND:
case DOSPTYP_EXTENDL:
- part_blkno = get_le(&dp2->dp_start) + extoff;
+ part_blkno = letoh32(dp2->dp_start) + extoff;
if (!extoff) {
- extoff = get_le(&dp2->dp_start);
+ extoff = letoh32(dp2->dp_start);
part_blkno = 0;
}
wander = 1;
@@ -388,13 +388,13 @@ writedisklabel(dev, strat, lp, osdep)
NDOSPART * sizeof(*dp));
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (get_le(&dp2->dp_size) && dp2->dp_typ == DOSPTYP_OPENBSD)
+ if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_OPENBSD)
ourpart = i;
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (get_le(&dp2->dp_size) && dp2->dp_typ == DOSPTYP_FREEBSD)
+ if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_FREEBSD)
ourpart = i;
for (dp2=dp, i=0; i < NDOSPART && ourpart == -1; i++, dp2++)
- if (get_le(&dp2->dp_size) && dp2->dp_typ == DOSPTYP_NETBSD)
+ if (letoh32(dp2->dp_size) && dp2->dp_typ == DOSPTYP_NETBSD)
ourpart = i;
if (ourpart != -1) {
@@ -404,7 +404,7 @@ writedisklabel(dev, strat, lp, osdep)
* need sector address for SCSI/IDE,
* cylinder for ESDI/ST506/RLL
*/
- dospartoff = get_le(&dp2->dp_start);
+ dospartoff = letoh32(dp2->dp_start);
cyl = DPCYL(dp2->dp_scyl, dp2->dp_ssect);
}
}