summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-06-18 18:16:40 +0000
committerphk <phk@FreeBSD.org>2003-06-18 18:16:40 +0000
commit591f399cfea86c008e5908349bbd5137d370f450 (patch)
tree8874c626d5d6663ddb7c81a0cd34260b7bdf70b8
parent86115a7357f5c4577ad10abe5990a13d644c2cc4 (diff)
downloadFreeBSD-src-591f399cfea86c008e5908349bbd5137d370f450.zip
FreeBSD-src-591f399cfea86c008e5908349bbd5137d370f450.tar.gz
Initialize struct fileops with C99 sparse initialization.
-rw-r--r--sys/dev/streams/streams.c9
-rw-r--r--sys/kern/kern_descrip.c15
-rw-r--r--sys/kern/kern_event.c15
-rw-r--r--sys/kern/sys_pipe.c10
-rw-r--r--sys/kern/sys_socket.c10
-rw-r--r--sys/kern/vfs_vnops.c10
-rw-r--r--sys/opencrypto/cryptodev.c14
7 files changed, 52 insertions, 31 deletions
diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c
index 822249a..0f7c3b4 100644
--- a/sys/dev/streams/streams.c
+++ b/sys/dev/streams/streams.c
@@ -90,8 +90,13 @@ static dev_t dt_ptm, dt_arp, dt_icmp, dt_ip, dt_tcp, dt_udp, dt_rawip,
dt_unix_dgram, dt_unix_stream, dt_unix_ord_stream;
static struct fileops svr4_netops = {
- soo_read, soo_write, soo_ioctl, soo_poll, soo_kqfilter,
- soo_stat, svr4_soo_close
+ .fo_read = soo_read,
+ .fo_write = soo_write,
+ .fo_ioctl = soo_ioctl,
+ .fo_poll = soo_poll,
+ .fo_kqfilter = soo_kqfilter,
+ .fo_stat = soo_stat,
+ .fo_close = svr4_soo_close
};
#define CDEV_MAJOR 103
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 8be3ec0..4c21b8b 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -2367,14 +2367,13 @@ static fo_stat_t badfo_stat;
static fo_close_t badfo_close;
struct fileops badfileops = {
- badfo_readwrite,
- badfo_readwrite,
- badfo_ioctl,
- badfo_poll,
- badfo_kqfilter,
- badfo_stat,
- badfo_close,
- 0
+ .fo_read = badfo_readwrite,
+ .fo_write = badfo_readwrite,
+ .fo_ioctl = badfo_ioctl,
+ .fo_poll = badfo_poll,
+ .fo_kqfilter = badfo_kqfilter,
+ .fo_stat = badfo_stat,
+ .fo_close = badfo_close,
};
static int
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index 87bdca0..8d5345d 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -69,14 +69,13 @@ static fo_stat_t kqueue_stat;
static fo_close_t kqueue_close;
static struct fileops kqueueops = {
- kqueue_read,
- kqueue_write,
- kqueue_ioctl,
- kqueue_poll,
- kqueue_kqfilter,
- kqueue_stat,
- kqueue_close,
- 0
+ .fo_read = kqueue_read,
+ .fo_write = kqueue_write,
+ .fo_ioctl = kqueue_ioctl,
+ .fo_poll = kqueue_poll,
+ .fo_kqfilter = kqueue_kqfilter,
+ .fo_stat = kqueue_stat,
+ .fo_close = kqueue_close,
};
static void knote_attach(struct knote *kn, struct filedesc *fdp);
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 4f62e92..5782b60 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -104,8 +104,14 @@ static fo_stat_t pipe_stat;
static fo_close_t pipe_close;
static struct fileops pipeops = {
- pipe_read, pipe_write, pipe_ioctl, pipe_poll, pipe_kqfilter,
- pipe_stat, pipe_close, DFLAG_PASSABLE
+ .fo_read = pipe_read,
+ .fo_write = pipe_write,
+ .fo_ioctl = pipe_ioctl,
+ .fo_poll = pipe_poll,
+ .fo_kqfilter = pipe_kqfilter,
+ .fo_stat = pipe_stat,
+ .fo_close = pipe_close,
+ .fo_flags = DFLAG_PASSABLE
};
static void filt_pipedetach(struct knote *kn);
diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c
index 7fe1b86..879e83d 100644
--- a/sys/kern/sys_socket.c
+++ b/sys/kern/sys_socket.c
@@ -57,8 +57,14 @@ __FBSDID("$FreeBSD$");
#include <net/route.h>
struct fileops socketops = {
- soo_read, soo_write, soo_ioctl, soo_poll, soo_kqfilter,
- soo_stat, soo_close, DFLAG_PASSABLE
+ .fo_read = soo_read,
+ .fo_write = soo_write,
+ .fo_ioctl = soo_ioctl,
+ .fo_poll = soo_poll,
+ .fo_kqfilter = soo_kqfilter,
+ .fo_stat = soo_stat,
+ .fo_close = soo_close,
+ .fo_flags = DFLAG_PASSABLE
};
/* ARGSUSED */
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index e1b4379..51cd231 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -73,8 +73,14 @@ static fo_stat_t vn_statfile;
static fo_close_t vn_closefile;
struct fileops vnops = {
- vn_read, vn_write, vn_ioctl, vn_poll, vn_kqfilter,
- vn_statfile, vn_closefile, DFLAG_PASSABLE
+ .fo_read = vn_read,
+ .fo_write = vn_write,
+ .fo_ioctl = vn_ioctl,
+ .fo_poll = vn_poll,
+ .fo_kqfilter = vn_kqfilter,
+ .fo_stat = vn_statfile,
+ .fo_close = vn_closefile,
+ .fo_flags = DFLAG_PASSABLE
};
int
diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c
index e711125..7d544ab 100644
--- a/sys/opencrypto/cryptodev.c
+++ b/sys/opencrypto/cryptodev.c
@@ -93,13 +93,13 @@ static int cryptof_stat(struct file *, struct stat *,
static int cryptof_close(struct file *, struct thread *);
static struct fileops cryptofops = {
- cryptof_rw,
- cryptof_rw,
- cryptof_ioctl,
- cryptof_poll,
- cryptof_kqfilter,
- cryptof_stat,
- cryptof_close
+ .fo_read = cryptof_rw,
+ .fo_write = cryptof_rw,
+ .fo_ioctl = cryptof_ioctl,
+ .fo_poll = cryptof_poll,
+ .fo_kqfilter = cryptof_kqfilter,
+ .fo_stat = cryptof_stat,
+ .fo_close = cryptof_close
};
static struct csession *csefind(struct fcrypt *, u_int);
OpenPOWER on IntegriCloud