diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-02 01:01:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-02 01:01:23 +0000 |
commit | 589168f6c573273a539302f6d474c1b6dc47fc02 (patch) | |
tree | c784de64c1049a23d89d6f4520bd321c1f6e3df7 /sys/arch/mvme68k | |
parent | 149e506338b6fe9a789fd110bfcd9c350865508b (diff) |
just overwrite anything in that zone of the disk, for writedisklabel()
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r-- | sys/arch/mvme68k/mvme68k/disksubr.c | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c index 06bc439958b..b26f95ddf2b 100644 --- a/sys/arch/mvme68k/mvme68k/disksubr.c +++ b/sys/arch/mvme68k/mvme68k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.14 1997/08/08 21:46:46 niklas Exp $ */ +/* $OpenBSD: disksubr.c,v 1.15 1997/10/02 01:01:22 deraadt Exp $ */ /* * Copyright (c) 1995 Dale Rahn. @@ -271,26 +271,19 @@ writedisklabel(dev, strat, lp, clp) } #endif - if (lp->d_magic == DISKMAGIC && lp->d_magic2 == DISKMAGIC && - dkcksum(lp) == 0) { - /* obtain buffer to scrozz drive with */ - bp = geteblk((int)lp->d_secsize); - - bcopy(clp, bp->b_data, sizeof(struct cpu_disklabel)); - - /* request no partition relocation by driver on I/O operations */ - bp->b_dev = dev; - bp->b_blkno = 0; /* contained in block 0 */ - bp->b_bcount = lp->d_secsize; - bp->b_flags = B_WRITE; - bp->b_cylin = 0; /* contained in block 0 */ - (*strat)(bp); - - error = biowait(bp); - - bp->b_flags = B_INVAL | B_AGE | B_READ; - brelse(bp); - } + /* obtain buffer to scrozz drive with */ + bp = geteblk((int)lp->d_secsize); + bcopy(clp, bp->b_data, sizeof(struct cpu_disklabel)); + /* request no partition relocation by driver on I/O operations */ + bp->b_dev = dev; + bp->b_blkno = 0; /* contained in block 0 */ + bp->b_bcount = lp->d_secsize; + bp->b_flags = B_WRITE; + bp->b_cylin = 0; /* contained in block 0 */ + (*strat)(bp); + error = biowait(bp); + bp->b_flags = B_INVAL | B_AGE | B_READ; + brelse(bp); return (error); } |