diff options
author | rik <rik@FreeBSD.org> | 2006-01-30 21:12:49 +0000 |
---|---|---|
committer | rik <rik@FreeBSD.org> | 2006-01-30 21:12:49 +0000 |
commit | 46c598d9a90bf0724c64850631275374a3062601 (patch) | |
tree | 93099af22fd1555f1ba6431fdcaf52ca36b7d4f2 /sys/dev/ce | |
parent | 5ab7d295cd76224062b8c66f11fd977a5d378836 (diff) | |
download | FreeBSD-src-46c598d9a90bf0724c64850631275374a3062601.zip FreeBSD-src-46c598d9a90bf0724c64850631275374a3062601.tar.gz |
Fix forward variable declaration.
Diffstat (limited to 'sys/dev/ce')
-rw-r--r-- | sys/dev/ce/if_ce.c | 129 |
1 files changed, 68 insertions, 61 deletions
diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c index 1735169..480e5c1 100644 --- a/sys/dev/ce/if_ce.c +++ b/sys/dev/ce/if_ce.c @@ -256,6 +256,74 @@ static struct callout timeout_handle; static int ce_destroy = 0; +#if __FreeBSD_version < 500000 +static int ce_open (dev_t dev, int oflags, int devtype, struct proc *p); +static int ce_close (dev_t dev, int fflag, int devtype, struct proc *p); +static int ce_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p); +#else +static int ce_open (struct cdev *dev, int oflags, int devtype, struct thread *td); +static int ce_close (struct cdev *dev, int fflag, int devtype, struct thread *td); +static int ce_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td); +#endif +#if __FreeBSD_version < 500000 +static struct cdevsw ce_cdevsw = { + ce_open, ce_close, noread, nowrite, + ce_ioctl, nopoll, nommap, nostrategy, + "ce", CDEV_MAJOR, nodump, nopsize, + D_NAGGED, -1 + }; +#elif __FreeBSD_version == 500000 +static struct cdevsw ce_cdevsw = { + ce_open, ce_close, noread, nowrite, + ce_ioctl, nopoll, nommap, nostrategy, + "ce", CDEV_MAJOR, nodump, nopsize, + D_NAGGED, + }; +#elif __FreeBSD_version <= 501000 +static struct cdevsw ce_cdevsw = { + .d_open = ce_open, + .d_close = ce_close, + .d_read = noread, + .d_write = nowrite, + .d_ioctl = ce_ioctl, + .d_poll = nopoll, + .d_mmap = nommap, + .d_strategy = nostrategy, + .d_name = "ce", + .d_maj = CDEV_MAJOR, + .d_dump = nodump, + .d_flags = D_NAGGED, +}; +#elif __FreeBSD_version < 502103 +static struct cdevsw ce_cdevsw = { + .d_open = ce_open, + .d_close = ce_close, + .d_ioctl = ce_ioctl, + .d_name = "ce", + .d_maj = CDEV_MAJOR, + .d_flags = D_NAGGED, +}; +#elif __FreeBSD_version < 600000 +static struct cdevsw ce_cdevsw = { + .d_version = D_VERSION, + .d_open = ce_open, + .d_close = ce_close, + .d_ioctl = ce_ioctl, + .d_name = "ce", + .d_maj = CDEV_MAJOR, + .d_flags = D_NEEDGIANT, +}; +#else /* __FreeBSD_version >= 600000 */ +static struct cdevsw ce_cdevsw = { + .d_version = D_VERSION, + .d_open = ce_open, + .d_close = ce_close, + .d_ioctl = ce_ioctl, + .d_name = "ce", + .d_flags = D_NEEDGIANT, +}; +#endif + /* * Print the mbuf chain, for debug purposes only. */ @@ -407,8 +475,6 @@ static void ce_intr (void *arg) } } -extern struct cdevsw ce_cdevsw; - #if __FreeBSD_version >= 500000 static void ce_bus_dmamap_addr (void *arg, bus_dma_segment_t *segs, int nseg, int error) @@ -1938,65 +2004,6 @@ static int ce_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struc return ENOTTY; } -#if __FreeBSD_version < 500000 -static struct cdevsw ce_cdevsw = { - ce_open, ce_close, noread, nowrite, - ce_ioctl, nopoll, nommap, nostrategy, - "ce", CDEV_MAJOR, nodump, nopsize, - D_NAGGED, -1 - }; -#elif __FreeBSD_version == 500000 -static struct cdevsw ce_cdevsw = { - ce_open, ce_close, noread, nowrite, - ce_ioctl, nopoll, nommap, nostrategy, - "ce", CDEV_MAJOR, nodump, nopsize, - D_NAGGED, - }; -#elif __FreeBSD_version <= 501000 -static struct cdevsw ce_cdevsw = { - .d_open = ce_open, - .d_close = ce_close, - .d_read = noread, - .d_write = nowrite, - .d_ioctl = ce_ioctl, - .d_poll = nopoll, - .d_mmap = nommap, - .d_strategy = nostrategy, - .d_name = "ce", - .d_maj = CDEV_MAJOR, - .d_dump = nodump, - .d_flags = D_NAGGED, -}; -#elif __FreeBSD_version < 502103 -static struct cdevsw ce_cdevsw = { - .d_open = ce_open, - .d_close = ce_close, - .d_ioctl = ce_ioctl, - .d_name = "ce", - .d_maj = CDEV_MAJOR, - .d_flags = D_NAGGED, -}; -#elif __FreeBSD_version < 600000 -static struct cdevsw ce_cdevsw = { - .d_version = D_VERSION, - .d_open = ce_open, - .d_close = ce_close, - .d_ioctl = ce_ioctl, - .d_name = "ce", - .d_maj = CDEV_MAJOR, - .d_flags = D_NEEDGIANT, -}; -#else /* __FreeBSD_version >= 600000 */ -static struct cdevsw ce_cdevsw = { - .d_version = D_VERSION, - .d_open = ce_open, - .d_close = ce_close, - .d_ioctl = ce_ioctl, - .d_name = "ce", - .d_flags = D_NEEDGIANT, -}; -#endif - #ifdef NETGRAPH #if __FreeBSD_version >= 500000 static int ng_ce_constructor (node_p node) |