On Wed, Jul 12, 2023 at 12:26:01PM +0200, thib4711 wrote:
> make it obvious in the vfsops assignment that an op isnt supported.

I agree that it is more readable.

ok semarie@

thanks.
-- 
Sebastien Marie

> diff --git sys/isofs/cd9660/cd9660_extern.h sys/isofs/cd9660/cd9660_extern.h
> index 2a5348e1768..bd8154a27bd 100644
> --- sys/isofs/cd9660/cd9660_extern.h
> +++ sys/isofs/cd9660/cd9660_extern.h
> @@ -94,10 +94,8 @@ int cd9660_vptofh(struct vnode *, struct fid *);
>  int cd9660_init(struct vfsconf *);
>  int cd9660_check_export(struct mount *, struct mbuf *, int *,
>                               struct ucred **);
> -#define cd9660_sysctl ((int (*)(int *, u_int, void *, size_t *, void *, \
> -                                    size_t, struct proc *))eopnotsupp)
>  
> -int cd9660_mountroot(void); 
> +int cd9660_mountroot(void);
>  
>  extern const struct vops     cd9660_vops;
>  extern const struct vops     cd9660_specvops;
> diff --git sys/isofs/cd9660/cd9660_vfsops.c sys/isofs/cd9660/cd9660_vfsops.c
> index ef0ffbbb152..b844a2ff709 100644
> --- sys/isofs/cd9660/cd9660_vfsops.c
> +++ sys/isofs/cd9660/cd9660_vfsops.c
> @@ -72,7 +72,7 @@ const struct vfsops cd9660_vfsops = {
>       .vfs_fhtovp     = cd9660_fhtovp,
>       .vfs_vptofh     = cd9660_vptofh,
>       .vfs_init       = cd9660_init,
> -     .vfs_sysctl     = cd9660_sysctl,
> +     .vfs_sysctl     = (void *)eopnotsupp,
>       .vfs_checkexp   = cd9660_check_export,
>  };
>  
> diff --git sys/msdosfs/msdosfs_vfsops.c sys/msdosfs/msdosfs_vfsops.c
> index 0de37665dfd..6b90195b5e5 100644
> --- sys/msdosfs/msdosfs_vfsops.c
> +++ sys/msdosfs/msdosfs_vfsops.c
> @@ -762,27 +762,18 @@ msdosfs_check_export(struct mount *mp, struct mbuf 
> *nam, int *exflagsp,
>       return (0);
>  }
>  
> -#define msdosfs_vget ((int (*)(struct mount *, ino_t, struct vnode **)) \
> -                   eopnotsupp)
> -
> -#define msdosfs_quotactl ((int (*)(struct mount *, int, uid_t, caddr_t, \
> -                                     struct proc *))eopnotsupp)
> -
> -#define msdosfs_sysctl ((int (*)(int *, u_int, void *, size_t *, void *, \
> -                                    size_t, struct proc *))eopnotsupp)
> -
>  const struct vfsops msdosfs_vfsops = {
>       .vfs_mount      = msdosfs_mount,
>       .vfs_start      = msdosfs_start,
>       .vfs_unmount    = msdosfs_unmount,
>       .vfs_root       = msdosfs_root,
> -     .vfs_quotactl   = msdosfs_quotactl,
> +     .vfs_quotactl   = (void *)eopnotsupp,
>       .vfs_statfs     = msdosfs_statfs,
>       .vfs_sync       = msdosfs_sync,
> -     .vfs_vget       = msdosfs_vget,
> +     .vfs_vget       = (void *)eopnotsupp,
>       .vfs_fhtovp     = msdosfs_fhtovp,
>       .vfs_vptofh     = msdosfs_vptofh,
>       .vfs_init       = msdosfs_init,
> -     .vfs_sysctl     = msdosfs_sysctl,
> +     .vfs_sysctl     = (void *)eopnotsupp,
>       .vfs_checkexp   = msdosfs_check_export,
>  };
> 

Reply via email to