diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-06-17 10:29:11 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-06-17 10:29:11 +0000 |
commit | 4fe32df5b2e384d37b69f2b24b8a18c81c44adb3 (patch) | |
tree | 0946da16ff249c41b756895c91e9c72d44474445 /sys/arch | |
parent | 30d20bf38a299122b405e75d2bf131e4801b0f95 (diff) |
Coerce this into compiling.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/mips64/mips64/disksubr.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sys/arch/mips64/mips64/disksubr.c b/sys/arch/mips64/mips64/disksubr.c index 17b97a30e9f..0136f8fbd7e 100644 --- a/sys/arch/mips64/mips64/disksubr.c +++ b/sys/arch/mips64/mips64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.59 2007/06/17 00:27:29 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.60 2007/06/17 10:29:10 miod Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -53,9 +53,6 @@ readbsdlabel(struct buf *bp, void (*strat)(struct buf *), int cyl, int sec, int off, struct disklabel *lp, int spoofonly) { - struct disklabel *dlp; - u_int16_t cksum; - /* don't read the on-disk label if we are in spoofed-only mode */ if (spoofonly) return (NULL); @@ -233,9 +230,9 @@ finished: return checkdisklabel(bp->b_data + LABELOFFSET, lp); done: - if (dbp) { - dbp->b_flags |= B_INVAL; - brelse(dbp); + if (bp) { + bp->b_flags |= B_INVAL; + brelse(bp); } return (msg); } @@ -248,18 +245,18 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp, struct cpu_disklabel *osdep) { int error, partoff = -1, cyl = 0; - char *msg = "no disk label"; struct buf *bp = NULL; + struct disklabel *dlp; /* get a buffer and initialize it */ bp = geteblk((int)lp->d_secsize); bp->b_dev = dev; /* find where the disklabel label should be placed */ - if (readsgilabel(bp, strat, &dl, &cdl, &partoff, &cyl, 1) == NULL) + if (readsgilabel(bp, strat, lp, osdep, &partoff, &cyl, 1) == NULL) goto writeit; - if (readdoslabel(bp, strat, &dl, &cdl, &partoff, &cyl, 1) == NULL) + if (readdoslabel(bp, strat, lp, osdep, &partoff, &cyl, 1) == NULL) goto writeit; error = EIO; |