On Mon, Apr 09, 2018 at 02:21:13PM +0200, Martin Pieuchot wrote:
> Like we did for 'struct protosw', I'd like to convert these definitions
> to help for grepping.
> 
> Ok?

OK bluhm@

> Index: kern/kern_event.c
> ===================================================================
> RCS file: /cvs/src/sys/kern/kern_event.c,v
> retrieving revision 1.86
> diff -u -p -r1.86 kern_event.c
> --- kern/kern_event.c 8 Apr 2018 16:45:12 -0000       1.86
> +++ kern/kern_event.c 9 Apr 2018 12:13:04 -0000
> @@ -71,13 +71,13 @@ int       kqueue_close(struct file *fp, struct
>  void kqueue_wakeup(struct kqueue *kq);
>  
>  struct fileops kqueueops = {
> -     kqueue_read,
> -     kqueue_write,
> -     kqueue_ioctl,
> -     kqueue_poll,
> -     kqueue_kqfilter,
> -     kqueue_stat,
> -     kqueue_close
> +     .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
>  };
>  
>  void knote_attach(struct knote *kn, struct filedesc *fdp);
> Index: kern/sys_socket.c
> ===================================================================
> RCS file: /cvs/src/sys/kern/sys_socket.c,v
> retrieving revision 1.35
> diff -u -p -r1.35 sys_socket.c
> --- kern/sys_socket.c 10 Dec 2017 11:31:54 -0000      1.35
> +++ kern/sys_socket.c 9 Apr 2018 12:14:08 -0000
> @@ -48,8 +48,13 @@
>  #include <net/route.h>
>  
>  struct       fileops socketops = {
> -     soo_read, soo_write, soo_ioctl, soo_poll, soo_kqfilter,
> -     soo_stat, 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       = soo_close
>  };
>  
>  int
> Index: kern/sys_pipe.c
> ===================================================================
> RCS file: /cvs/src/sys/kern/sys_pipe.c,v
> retrieving revision 1.77
> diff -u -p -r1.77 sys_pipe.c
> --- kern/sys_pipe.c   2 Jan 2018 06:38:45 -0000       1.77
> +++ kern/sys_pipe.c   9 Apr 2018 12:13:39 -0000
> @@ -61,8 +61,13 @@ int        pipe_ioctl(struct file *, u_long, ca
>  int  pipe_stat(struct file *fp, struct stat *ub, struct proc *p);
>  
>  static struct fileops pipeops = {
> -     pipe_read, pipe_write, pipe_ioctl, pipe_poll, pipe_kqfilter,
> -     pipe_stat, pipe_close 
> +     .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
>  };
>  
>  void filt_pipedetach(struct knote *kn);
> Index: kern/vfs_vnops.c
> ===================================================================
> RCS file: /cvs/src/sys/kern/vfs_vnops.c,v
> retrieving revision 1.89
> diff -u -p -r1.89 vfs_vnops.c
> --- kern/vfs_vnops.c  2 Jan 2018 06:38:45 -0000       1.89
> +++ kern/vfs_vnops.c  9 Apr 2018 12:14:53 -0000
> @@ -65,9 +65,15 @@ int vn_poll(struct file *, int, struct p
>  int vn_kqfilter(struct file *, struct knote *);
>  int vn_closefile(struct file *, struct proc *);
>  
> -struct       fileops vnops =
> -     { vn_read, vn_write, vn_ioctl, vn_poll, vn_kqfilter, vn_statfile,
> -       vn_closefile };
> +struct       fileops vnops = {
> +     .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
> +};
>  
>  /*
>   * Common code for vnode open operations.

Reply via email to