Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern KNF - remove the K&R function definitions
details: https://anonhg.NetBSD.org/src/rev/ba191f290777
branches: trunk
changeset: 586397:ba191f290777
user: dsl <dsl%NetBSD.org@localhost>
date: Sun Dec 18 17:02:45 2005 +0000
description:
KNF - remove the K&R function definitions
diffstat:
sys/kern/subr_disk_mbr.c | 45 ++++++++++++++++++---------------------------
1 files changed, 18 insertions(+), 27 deletions(-)
diffs (123 lines):
diff -r 612736f960f3 -r ba191f290777 sys/kern/subr_disk_mbr.c
--- a/sys/kern/subr_disk_mbr.c Sun Dec 18 16:48:06 2005 +0000
+++ b/sys/kern/subr_disk_mbr.c Sun Dec 18 17:02:45 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_disk_mbr.c,v 1.12 2005/12/18 16:48:06 dsl Exp $ */
+/* $NetBSD: subr_disk_mbr.c,v 1.13 2005/12/18 17:02:45 dsl Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_disk_mbr.c,v 1.12 2005/12/18 16:48:06 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk_mbr.c,v 1.13 2005/12/18 17:02:45 dsl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -65,6 +65,8 @@
#include "opt_mbr.h"
+typedef struct mbr_partition mbr_partition_t;
+
#define MBR_LABELSECTOR 1
#define SCAN_CONTINUE 0
@@ -85,8 +87,8 @@
#define UPDATE_LABEL 2
#define WRITE_LABEL 3
static int validate_label(mbr_args_t *, uint, int);
-static int look_netbsd_part(mbr_args_t *, struct mbr_partition *, int, uint);
-static int write_netbsd_label(mbr_args_t *, struct mbr_partition *, int, uint);
+static int look_netbsd_part(mbr_args_t *, mbr_partition_t *, int, uint);
+static int write_netbsd_label(mbr_args_t *, mbr_partition_t *, int, uint);
static int
read_sector(mbr_args_t *a, uint sector)
@@ -110,10 +112,10 @@
*/
static int
-scan_mbr(mbr_args_t *a, int (*actn)(mbr_args_t *, struct mbr_partition *, int, uint))
+scan_mbr(mbr_args_t *a, int (*actn)(mbr_args_t *, mbr_partition_t *, int, uint))
{
- struct mbr_partition ptns[MBR_PART_COUNT];
- struct mbr_partition *dp;
+ mbr_partition_t ptns[MBR_PART_COUNT];
+ mbr_partition_t *dp;
struct mbr_sector *mbr;
uint ext_base, this_ext, next_ext;
int rval;
@@ -197,11 +199,8 @@
* Returns null on success and an error string on failure.
*/
const char *
-readdisklabel(dev, strat, lp, osdep)
- dev_t dev;
- void (*strat)(struct buf *);
- struct disklabel *lp;
- struct cpu_disklabel *osdep;
+readdisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp,
+ struct cpu_disklabel *osdep)
{
struct dkbad *bdp;
int rval;
@@ -303,7 +302,7 @@
}
static int
-look_netbsd_part(mbr_args_t *a, struct mbr_partition *dp, int slot, uint ext_base)
+look_netbsd_part(mbr_args_t *a, mbr_partition_t *dp, int slot, uint ext_base)
{
struct partition *pp;
int ptn_base = ext_base + le32toh(dp->mbrp_start);
@@ -434,10 +433,8 @@
* 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_long openmask,
+ struct cpu_disklabel *osdep)
{
int i;
struct partition *opp, *npp;
@@ -488,11 +485,8 @@
* Write disk label back to device after modification.
*/
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)
{
mbr_args_t a;
@@ -521,7 +515,7 @@
}
static int
-write_netbsd_label(mbr_args_t *a, struct mbr_partition *dp, int slot, uint ext_base)
+write_netbsd_label(mbr_args_t *a, mbr_partition_t *dp, int slot, uint ext_base)
{
int ptn_base = ext_base + le32toh(dp->mbrp_start);
@@ -538,10 +532,7 @@
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(dk, bp, wlabel)
- struct disk *dk;
- struct buf *bp;
- int wlabel;
+bounds_check_with_label(struct disk *dk, struct buf *bp, int wlabel)
{
struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
Home |
Main Index |
Thread Index |
Old Index