From d11216cf36578f6f06482da63b45f1cf02b7ec1d Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 6 Jun 2007 16:42:08 +0000 Subject: a fair sprinking of knf, code movement, and sometimes character-by-character accuracy so that the variious disksubr.c's can be compared easier. setdisklabel() starts taking an int for openmask. ok krw, and read by quite a few other people --- sys/arch/aviion/aviion/disksubr.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'sys/arch/aviion') diff --git a/sys/arch/aviion/aviion/disksubr.c b/sys/arch/aviion/aviion/disksubr.c index 625a03e3ee2..02f6b44b5d7 100644 --- a/sys/arch/aviion/aviion/disksubr.c +++ b/sys/arch/aviion/aviion/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.23 2007/06/05 00:38:14 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.24 2007/06/06 16:42:06 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -60,12 +60,8 @@ * Returns null on success and an error string on failure. */ char * -readdisklabel(dev, strat, lp, osdep, spoofonly) - dev_t dev; - void (*strat)(struct buf *); - struct disklabel *lp; - struct cpu_disklabel *osdep; - int spoofonly; +readdisklabel(dev_t dev, void (*strat)(struct buf *), + struct disklabel *lp, struct cpu_disklabel *osdep, int spoofonly) { struct dos_partition dp[NDOSPART], *dp2; struct partition *pp; @@ -120,7 +116,7 @@ readdisklabel(dev, strat, lp, osdep, spoofonly) bp->b_flags = B_BUSY | B_READ; bp->b_cylinder = part_blkno / lp->d_secpercyl; (*strat)(bp); - + /* if successful, wander through dos partition table */ if (biowait(bp)) { msg = "dos partition I/O error"; @@ -301,10 +297,8 @@ done: * before setting it. */ int -setdisklabel(olp, nlp, openmask, osdep) - struct disklabel *olp, *nlp; - u_long openmask; - struct cpu_disklabel *osdep; +setdisklabel(struct disklabel *olp, struct disklabel *nlp, + u_int openmask, struct cpu_disklabel *osdep) { int i; struct partition *opp, *npp; @@ -358,11 +352,8 @@ setdisklabel(olp, nlp, openmask, osdep) * XXX cannot handle OpenBSD partitions in extended partitions! */ int -writedisklabel(dev, strat, lp, osdep) - dev_t dev; - void (*strat)(struct buf *); - struct disklabel *lp; - struct cpu_disklabel *osdep; +writedisklabel(dev_t dev, void (*strat)(struct buf *), + struct disklabel *lp, struct cpu_disklabel *osdep) { struct dos_partition dp[NDOSPART], *dp2; struct disklabel *dlp; -- cgit v1.2.3