From 7e4a9dced9acd97789b37c32063ee7a8aa133f6d Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 30 May 1999 16:53:49 +0000 Subject: This commit should be a extensive NO-OP: Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors. --- sys/net/bpf.c | 27 ++++++++++++++++++++++----- sys/net/if_tun.c | 22 +++++++++++++++++++--- 2 files changed, 41 insertions(+), 8 deletions(-) (limited to 'sys/net') diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 5b6dd2f..40d3609 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -37,7 +37,7 @@ * * @(#)bpf.c 8.2 (Berkeley) 3/28/94 * - * $Id: bpf.c,v 1.48 1999/04/28 01:18:13 msmith Exp $ + * $Id: bpf.c,v 1.49 1999/04/28 11:37:30 phk Exp $ */ #include "bpfilter.h" @@ -141,10 +141,27 @@ static d_ioctl_t bpfioctl; static d_poll_t bpfpoll; #define CDEV_MAJOR 23 -static struct cdevsw bpf_cdevsw = - { bpfopen, bpfclose, bpfread, bpfwrite, /*23*/ - bpfioctl, nostop, nullreset, nodevtotty,/* bpf */ - bpfpoll, nommap, NULL, "bpf", NULL, -1 }; +static struct cdevsw bpf_cdevsw = { + /* open */ bpfopen, + /* close */ bpfclose, + /* read */ bpfread, + /* write */ bpfwrite, + /* ioctl */ bpfioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ bpfpoll, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "bpf", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 +}; static int diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index e553949..071e628 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -85,9 +85,25 @@ static d_poll_t tunpoll; #define CDEV_MAJOR 52 static struct cdevsw tun_cdevsw = { - tunopen, tunclose, tunread, tunwrite, - tunioctl, nullstop, noreset, nodevtotty, - tunpoll, nommap, nostrategy, "tun", NULL, -1 + /* open */ tunopen, + /* close */ tunclose, + /* read */ tunread, + /* write */ tunwrite, + /* ioctl */ tunioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ tunpoll, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "tun", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 }; -- cgit v1.1