diff options
| author | matt <matt@NetBSD.org> | 2001-08-26 02:49:18 +0000 |
|---|---|---|
| committer | matt <matt@NetBSD.org> | 2001-08-26 02:49:18 +0000 |
| commit | 5911b9a67fba46a3e1cf4bddfc97409f47825fc7 (patch) | |
| tree | 2e54f5471607e740fc07c71cd588755f2bc827c6 /sys/dev/ofw/ofdisk.c | |
| parent | 449a75885045e13aebf48268b37ea0caae4cc35f (diff) | |
Make compile with -Wmissing-prototype -Wstrict-prototypes
Diffstat (limited to 'sys/dev/ofw/ofdisk.c')
| -rw-r--r-- | sys/dev/ofw/ofdisk.c | 71 |
1 files changed, 19 insertions, 52 deletions
diff --git a/sys/dev/ofw/ofdisk.c b/sys/dev/ofw/ofdisk.c index 3a123759b22..5a13622a238 100644 --- a/sys/dev/ofw/ofdisk.c +++ b/sys/dev/ofw/ofdisk.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofdisk.c,v 1.16 2001/08/25 19:05:04 matt Exp $ */ +/* $NetBSD: ofdisk.c,v 1.17 2001/08/26 02:49:18 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -62,8 +62,8 @@ cdev_decl(ofdisk_); /* sc_flags */ #define OFDF_ISFLOPPY 0x01 /* we are a floppy drive */ -static int ofdisk_match __P((struct device *, struct cfdata *, void *)); -static void ofdisk_attach __P((struct device *, struct device *, void *)); +static int ofdisk_match (struct device *, struct cfdata *, void *); +static void ofdisk_attach (struct device *, struct device *, void *); struct cfattach ofdisk_ca = { sizeof(struct ofdisk_softc), ofdisk_match, ofdisk_attach @@ -71,18 +71,15 @@ struct cfattach ofdisk_ca = { extern struct cfdriver ofdisk_cd; -void ofdisk_strategy __P((struct buf *)); +void ofdisk_strategy (struct buf *); struct dkdriver ofdisk_dkdriver = { ofdisk_strategy }; -void ofdisk_getdefaultlabel __P((struct ofdisk_softc *, struct disklabel *)); -void ofdisk_getdisklabel __P((dev_t)); +void ofdisk_getdefaultlabel (struct ofdisk_softc *, struct disklabel *); +void ofdisk_getdisklabel (dev_t); static int -ofdisk_match(parent, match, aux) - struct device *parent; - struct cfdata *match; - void *aux; +ofdisk_match(struct device *parent, struct cfdata *match, void *aux) { struct ofbus_attach_args *oba = aux; char type[8]; @@ -100,9 +97,7 @@ ofdisk_match(parent, match, aux) } static void -ofdisk_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +ofdisk_attach(struct device *parent, struct device *self, void *aux) { struct ofdisk_softc *of = (void *)self; struct ofbus_attach_args *oba = aux; @@ -134,11 +129,7 @@ ofdisk_attach(parent, self, aux) } int -ofdisk_open(dev, flags, fmt, p) - dev_t dev; - int flags; - int fmt; - struct proc *p; +ofdisk_open(dev_t dev, int flags, int fmt, struct proc *p) { int unit = DISKUNIT(dev); struct ofdisk_softc *of; @@ -201,11 +192,7 @@ ofdisk_open(dev, flags, fmt, p) } int -ofdisk_close(dev, flags, fmt, p) - dev_t dev; - int flags; - int fmt; - struct proc *p; +ofdisk_close(dev_t dev, int flags, int fmt, struct proc *p) { struct ofdisk_softc *of = ofdisk_cd.cd_devs[DISKUNIT(dev)]; @@ -234,8 +221,7 @@ ofdisk_close(dev, flags, fmt, p) } void -ofdisk_strategy(bp) - struct buf *bp; +ofdisk_strategy(struct buf *bp) { struct ofdisk_softc *of = ofdisk_cd.cd_devs[DISKUNIT(bp->b_dev)]; struct partition *p; @@ -283,8 +269,7 @@ done: } static void -ofminphys(bp) - struct buf *bp; +ofminphys(struct buf *bp) { struct ofdisk_softc *of = ofdisk_cd.cd_devs[DISKUNIT(bp->b_dev)]; @@ -293,30 +278,19 @@ ofminphys(bp) } int -ofdisk_read(dev, uio, flags) - dev_t dev; - struct uio *uio; - int flags; +ofdisk_read(dev_t dev, struct uio *uio, int flags) { return physio(ofdisk_strategy, NULL, dev, B_READ, ofminphys, uio); } int -ofdisk_write(dev, uio, flags) - dev_t dev; - struct uio *uio; - int flags; +ofdisk_write(dev_t dev, struct uio *uio, int flags) { return physio(ofdisk_strategy, NULL, dev, B_WRITE, ofminphys, uio); } int -ofdisk_ioctl(dev, cmd, data, flag, p) - dev_t dev; - u_long cmd; - caddr_t data; - int flag; - struct proc *p; +ofdisk_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { struct ofdisk_softc *of = ofdisk_cd.cd_devs[DISKUNIT(dev)]; int error; @@ -397,18 +371,13 @@ ofdisk_ioctl(dev, cmd, data, flag, p) } int -ofdisk_dump(dev, blkno, va, size) - dev_t dev; - daddr_t blkno; - caddr_t va; - size_t size; +ofdisk_dump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) { return EINVAL; } int -ofdisk_size(dev) - dev_t dev; +ofdisk_size(dev_t dev) { struct ofdisk_softc *of; struct disklabel *lp; @@ -439,12 +408,10 @@ ofdisk_size(dev) } void -ofdisk_getdefaultlabel(of, lp) - struct ofdisk_softc *of; - struct disklabel *lp; +ofdisk_getdefaultlabel(struct ofdisk_softc *of, struct disklabel *lp) { - bzero(lp, sizeof *lp); + memset(lp, 0, sizeof *lp); /* * XXX Firmware bug? Asking for block size gives a |
