From 4fe32df5b2e384d37b69f2b24b8a18c81c44adb3 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 17 Jun 2007 10:29:11 +0000 Subject: Coerce this into compiling. --- sys/arch/mips64/mips64/disksubr.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'sys/arch') 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; -- cgit v1.2.3