diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-09-12 20:03:45 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-09-12 20:03:45 +0000 |
commit | 53eaed07bcf1ec0f1a38e0b490d95f1ee307055a (patch) | |
tree | a4c213c079a55cd47cd1026ebfbedf0f22cafea1 /sys/kern/vfs_subr.c | |
parent | db3ff4e5c03b76a4899555f3db282820ce0c3470 (diff) | |
download | FreeBSD-src-53eaed07bcf1ec0f1a38e0b490d95f1ee307055a.zip FreeBSD-src-53eaed07bcf1ec0f1a38e0b490d95f1ee307055a.tar.gz |
Use C99 initialization for struct filterops.
Obtained from: Mac OS X
Sponsored by: Apple Inc.
MFC after: 3 weeks
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index f3ec565..c40dad1 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4002,8 +4002,12 @@ static int filt_fsattach(struct knote *kn); static void filt_fsdetach(struct knote *kn); static int filt_fsevent(struct knote *kn, long hint); -struct filterops fs_filtops = - { 0, filt_fsattach, filt_fsdetach, filt_fsevent }; +struct filterops fs_filtops = { + .f_isfd = 0, + .f_attach = filt_fsattach, + .f_detach = filt_fsdetach, + .f_event = filt_fsevent +}; static int filt_fsattach(struct knote *kn) @@ -4076,12 +4080,21 @@ static int filt_vfsread(struct knote *kn, long hint); static int filt_vfswrite(struct knote *kn, long hint); static int filt_vfsvnode(struct knote *kn, long hint); static void filt_vfsdetach(struct knote *kn); -static struct filterops vfsread_filtops = - { 1, NULL, filt_vfsdetach, filt_vfsread }; -static struct filterops vfswrite_filtops = - { 1, NULL, filt_vfsdetach, filt_vfswrite }; -static struct filterops vfsvnode_filtops = - { 1, NULL, filt_vfsdetach, filt_vfsvnode }; +static struct filterops vfsread_filtops = { + .f_isfd = 1, + .f_detach = filt_vfsdetach, + .f_event = filt_vfsread +}; +static struct filterops vfswrite_filtops = { + .f_isfd = 1, + .f_detach = filt_vfsdetach, + .f_event = filt_vfswrite +}; +static struct filterops vfsvnode_filtops = { + .f_isfd = 1, + .f_detach = filt_vfsdetach, + .f_event = filt_vfsvnode +}; static void vfs_knllock(void *arg) |