summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-03-03 12:15:54 +0000
committerphk <phk@FreeBSD.org>2003-03-03 12:15:54 +0000
commit0ae911eb0e57eebb61c50c02ddf69aa67ed19599 (patch)
tree4e91d5779ffebe1d75e975aa4450f35f965430eb /sys/net
parente58d97a666e757e8429a219da05f88a51554c32c (diff)
downloadFreeBSD-src-0ae911eb0e57eebb61c50c02ddf69aa67ed19599.zip
FreeBSD-src-0ae911eb0e57eebb61c50c02ddf69aa67ed19599.tar.gz
Gigacommit to improve device-driver source compatibility between
branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c21
-rw-r--r--sys/net/if.c21
-rw-r--r--sys/net/if_tap.c21
-rw-r--r--sys/net/if_tun.c21
4 files changed, 31 insertions, 53 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 38ae861..a27cd3b 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -121,19 +121,14 @@ static d_poll_t bpfpoll;
#define CDEV_MAJOR 23
static struct cdevsw bpf_cdevsw = {
- /* open */ bpfopen,
- /* close */ bpfclose,
- /* read */ bpfread,
- /* write */ bpfwrite,
- /* ioctl */ bpfioctl,
- /* poll */ bpfpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "bpf",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = bpfopen,
+ .d_close = bpfclose,
+ .d_read = bpfread,
+ .d_write = bpfwrite,
+ .d_ioctl = bpfioctl,
+ .d_poll = bpfpoll,
+ .d_name = "bpf",
+ .d_maj = CDEV_MAJOR,
};
diff --git a/sys/net/if.c b/sys/net/if.c
index cdf5fd3..bad9780 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -131,20 +131,13 @@ static d_ioctl_t netioctl;
static d_kqfilter_t netkqfilter;
static struct cdevsw net_cdevsw = {
- /* open */ netopen,
- /* close */ netclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ netioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "net",
- /* maj */ MAJOR_AUTO,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_KQFILTER,
- /* kqfilter */ netkqfilter,
+ .d_open = netopen,
+ .d_close = netclose,
+ .d_ioctl = netioctl,
+ .d_name = "net",
+ .d_maj = MAJOR_AUTO,
+ .d_flags = D_KQFILTER,
+ .d_kqfilter = netkqfilter,
};
static int
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index 388ca60..3ac2be8 100644
--- a/sys/net/if_tap.c
+++ b/sys/net/if_tap.c
@@ -101,19 +101,14 @@ static d_ioctl_t tapioctl;
static d_poll_t tappoll;
static struct cdevsw tap_cdevsw = {
- /* open */ tapopen,
- /* close */ tapclose,
- /* read */ tapread,
- /* write */ tapwrite,
- /* ioctl */ tapioctl,
- /* poll */ tappoll,
- /* mmap */ nommap,
- /* startegy */ nostrategy,
- /* dev name */ CDEV_NAME,
- /* dev major */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = tapopen,
+ .d_close = tapclose,
+ .d_read = tapread,
+ .d_write = tapwrite,
+ .d_ioctl = tapioctl,
+ .d_poll = tappoll,
+ .d_name = CDEV_NAME,
+ .d_maj = CDEV_MAJOR,
};
static int tapdebug = 0; /* debug flag */
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 1c7d61e..e0b3c97 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -81,19 +81,14 @@ static d_poll_t tunpoll;
#define CDEV_MAJOR 52
static struct cdevsw tun_cdevsw = {
- /* open */ tunopen,
- /* close */ tunclose,
- /* read */ tunread,
- /* write */ tunwrite,
- /* ioctl */ tunioctl,
- /* poll */ tunpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ TUNNAME,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = tunopen,
+ .d_close = tunclose,
+ .d_read = tunread,
+ .d_write = tunwrite,
+ .d_ioctl = tunioctl,
+ .d_poll = tunpoll,
+ .d_name = TUNNAME,
+ .d_maj = CDEV_MAJOR,
};
static void
OpenPOWER on IntegriCloud