diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-10-19 09:32:16 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-10-19 09:32:16 +0000 |
commit | debcb7ced82dc346fc1a7d576edfa8dbe12a4038 (patch) | |
tree | 34fe00c1c59eb80e09e06277ef0e4d66f78f427a /sys/arch/macppc | |
parent | dc05eaace09fc998d4d12fd34621f2a18b1e139d (diff) |
Use daddr_t * instead of int * for the partoffp parameter to
readdoslabel(). Ditto all the MD variables whose addresses are passed
to readdoslabel() via partoffp.
Fix some 512-byte block vs disk sector confusion in hppa and sgi.
All the DL_GETxxxxx() defines return disk sector values. All
DL_SETxxxx() take disk sector values. These changes should be no-ops
until a drive using non-512-byte-sectors is encountered.
ok deraadt@
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r-- | sys/arch/macppc/macppc/disksubr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c index df9787301ce..2f0aced778e 100644 --- a/sys/arch/macppc/macppc/disksubr.c +++ b/sys/arch/macppc/macppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.77 2011/07/10 16:16:08 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.78 2013/10/19 09:32:14 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -38,7 +38,7 @@ #include <sys/disk.h> int readdpmelabel(struct buf *, void (*)(struct buf *), - struct disklabel *, int *, int); + struct disklabel *, daddr_t *, int); /* * Attempt to read a disk label from a device @@ -99,10 +99,10 @@ done: int readdpmelabel(struct buf *bp, void (*strat)(struct buf *), - struct disklabel *lp, int *partoffp, int spoofonly) + struct disklabel *lp, daddr_t *partoffp, int spoofonly) { int i, part_cnt, n, hfspartoff = -1; - u_int64_t hfspartend = DL_GETDSIZE(lp); + long long hfspartend = DL_GETDSIZE(lp); struct part_map_entry *part; /* First check for a DPME (HFS) disklabel */ @@ -200,7 +200,8 @@ readdpmelabel(struct buf *bp, void (*strat)(struct buf *), int writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) { - int error = EIO, partoff = -1; + daddr_t partoff = -1; + int error = EIO; int offset; struct disklabel *dlp; struct buf *bp = NULL; |