diff options
author | Dariusz Swiderski <dms@cvs.openbsd.org> | 2009-08-17 23:27:58 +0000 |
---|---|---|
committer | Dariusz Swiderski <dms@cvs.openbsd.org> | 2009-08-17 23:27:58 +0000 |
commit | 87c8955d67ec66ecc835cfd9e43820a049c8ed0e (patch) | |
tree | d076502a33f831869a6f8563a9afe25988645a94 | |
parent | b76b50ab06b9eaaa1a829e5fa06e66ad54ef831a (diff) |
fix readdpmelabel() declaration since the definition was changed
from returning char* to int, last char* return removed as well
(cleanup after deraadt@ commit, it compiles now)
while there initialize hfspartend to some sane value (sync with macppc
version)
ok kettenis@
-rw-r--r-- | sys/arch/socppc/socppc/disksubr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/socppc/socppc/disksubr.c b/sys/arch/socppc/socppc/disksubr.c index 8bfa40dbaa4..3320cab171e 100644 --- a/sys/arch/socppc/socppc/disksubr.c +++ b/sys/arch/socppc/socppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.10 2009/08/13 15:23:11 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.11 2009/08/17 23:27:57 dms Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -37,7 +37,7 @@ #include <sys/disklabel.h> #include <sys/disk.h> -char *readdpmelabel(struct buf *, void (*)(struct buf *), +int readdpmelabel(struct buf *, void (*)(struct buf *), struct disklabel *, int *, int); /* @@ -104,7 +104,7 @@ readdpmelabel(struct buf *bp, void (*strat)(struct buf *), struct disklabel *lp, int *partoffp, int spoofonly) { int i, part_cnt, n, hfspartoff = -1; - u_int64_t hfspartend; + u_int64_t hfspartend = DL_GETDSIZE(lp); struct part_map_entry *part; /* First check for a DPME (HFS) disklabel */ @@ -119,7 +119,7 @@ readdpmelabel(struct buf *bp, void (*strat)(struct buf *), part = (struct part_map_entry *)bp->b_data; /* if first partition is not valid, assume not HFS/DPME partitioned */ if (part->pmSig != PART_ENTRY_MAGIC) - return ("not a DPME partition"); + return (EINVAL); /* not a DPME partition */ part_cnt = part->pmMapBlkCnt; n = 8; for (i = 0; i < part_cnt; i++) { |