From debcb7ced82dc346fc1a7d576edfa8dbe12a4038 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sat, 19 Oct 2013 09:32:16 +0000 Subject: 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@ --- sys/arch/macppc/macppc/disksubr.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sys/arch/macppc') 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 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; -- cgit v1.2.3