summaryrefslogtreecommitdiffstats
path: root/sys/msdosfs/msdosfs_vnops.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-11-09 08:17:23 +0000
committerbde <bde@FreeBSD.org>1995-11-09 08:17:23 +0000
commit449a11eb8852c894681575cf4226b1c639a2f9bc (patch)
treed1df2f42cd1cf04bc5757d3dff0d353c3e6a3a58 /sys/msdosfs/msdosfs_vnops.c
parent7b39ff1acd679291e1eaa968c4a256d7c6e3b22f (diff)
downloadFreeBSD-src-449a11eb8852c894681575cf4226b1c639a2f9bc.zip
FreeBSD-src-449a11eb8852c894681575cf4226b1c639a2f9bc.tar.gz
Introduced a type `vop_t' for vnode operation functions and used
it 1138 times (:-() in casts and a few more times in declarations. This change is null for the i386. The type has to be `typedef int vop_t(void *)' and not `typedef int vop_t()' because `gcc -Wstrict-prototypes' warns about the latter. Since vnode op functions are called with args of different (struct pointer) types, neither of these function types is any use for type checking of the arg, so it would be preferable not to use the complete function type, especially since using the complete type requires adding 1138 casts to avoid compiler warnings and another 40+ casts to reverse the function pointer conversions before calling the functions.
Diffstat (limited to 'sys/msdosfs/msdosfs_vnops.c')
-rw-r--r--sys/msdosfs/msdosfs_vnops.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index b501a5d..de44543 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_vnops.c,v 1.25 1995/10/22 09:32:37 davidg Exp $ */
+/* $Id: msdosfs_vnops.c,v 1.26 1995/10/29 15:31:53 phk Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */
/*-
@@ -2000,46 +2000,46 @@ msdosfs_pathconf(ap)
}
/* Global vfs data structures for msdosfs */
-int (**msdosfs_vnodeop_p)();
+vop_t **msdosfs_vnodeop_p;
static struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = {
- { &vop_default_desc, vn_default_error },
- { &vop_lookup_desc, msdosfs_lookup }, /* lookup */
- { &vop_create_desc, msdosfs_create }, /* create */
- { &vop_mknod_desc, msdosfs_mknod }, /* mknod */
- { &vop_open_desc, msdosfs_open }, /* open */
- { &vop_close_desc, msdosfs_close }, /* close */
- { &vop_access_desc, msdosfs_access }, /* access */
- { &vop_getattr_desc, msdosfs_getattr }, /* getattr */
- { &vop_setattr_desc, msdosfs_setattr }, /* setattr */
- { &vop_read_desc, msdosfs_read }, /* read */
- { &vop_write_desc, msdosfs_write }, /* write */
- { &vop_ioctl_desc, msdosfs_ioctl }, /* ioctl */
- { &vop_select_desc, msdosfs_select }, /* select */
- { &vop_mmap_desc, msdosfs_mmap }, /* mmap */
- { &vop_fsync_desc, msdosfs_fsync }, /* fsync */
- { &vop_seek_desc, msdosfs_seek }, /* seek */
- { &vop_remove_desc, msdosfs_remove }, /* remove */
- { &vop_link_desc, msdosfs_link }, /* link */
- { &vop_rename_desc, msdosfs_rename }, /* rename */
- { &vop_mkdir_desc, msdosfs_mkdir }, /* mkdir */
- { &vop_rmdir_desc, msdosfs_rmdir }, /* rmdir */
- { &vop_symlink_desc, msdosfs_symlink }, /* symlink */
- { &vop_readdir_desc, msdosfs_readdir }, /* readdir */
- { &vop_readlink_desc, msdosfs_readlink }, /* readlink */
- { &vop_abortop_desc, msdosfs_abortop }, /* abortop */
- { &vop_inactive_desc, msdosfs_inactive }, /* inactive */
- { &vop_reclaim_desc, msdosfs_reclaim }, /* reclaim */
- { &vop_lock_desc, msdosfs_lock }, /* lock */
- { &vop_unlock_desc, msdosfs_unlock }, /* unlock */
- { &vop_bmap_desc, msdosfs_bmap }, /* bmap */
- { &vop_strategy_desc, msdosfs_strategy }, /* strategy */
- { &vop_print_desc, msdosfs_print }, /* print */
- { &vop_islocked_desc, msdosfs_islocked }, /* islocked */
- { &vop_pathconf_desc, msdosfs_pathconf }, /* pathconf */
- { &vop_advlock_desc, msdosfs_advlock }, /* advlock */
- { &vop_reallocblks_desc, msdosfs_reallocblks }, /* reallocblks */
- { &vop_bwrite_desc, vn_bwrite },
- { (struct vnodeop_desc *)NULL, (int (*)())NULL }
+ { &vop_default_desc, (vop_t *)vn_default_error },
+ { &vop_lookup_desc, (vop_t *)msdosfs_lookup }, /* lookup */
+ { &vop_create_desc, (vop_t *)msdosfs_create }, /* create */
+ { &vop_mknod_desc, (vop_t *)msdosfs_mknod }, /* mknod */
+ { &vop_open_desc, (vop_t *)msdosfs_open }, /* open */
+ { &vop_close_desc, (vop_t *)msdosfs_close }, /* close */
+ { &vop_access_desc, (vop_t *)msdosfs_access }, /* access */
+ { &vop_getattr_desc, (vop_t *)msdosfs_getattr }, /* getattr */
+ { &vop_setattr_desc, (vop_t *)msdosfs_setattr }, /* setattr */
+ { &vop_read_desc, (vop_t *)msdosfs_read }, /* read */
+ { &vop_write_desc, (vop_t *)msdosfs_write }, /* write */
+ { &vop_ioctl_desc, (vop_t *)msdosfs_ioctl }, /* ioctl */
+ { &vop_select_desc, (vop_t *)msdosfs_select }, /* select */
+ { &vop_mmap_desc, (vop_t *)msdosfs_mmap }, /* mmap */
+ { &vop_fsync_desc, (vop_t *)msdosfs_fsync }, /* fsync */
+ { &vop_seek_desc, (vop_t *)msdosfs_seek }, /* seek */
+ { &vop_remove_desc, (vop_t *)msdosfs_remove }, /* remove */
+ { &vop_link_desc, (vop_t *)msdosfs_link }, /* link */
+ { &vop_rename_desc, (vop_t *)msdosfs_rename }, /* rename */
+ { &vop_mkdir_desc, (vop_t *)msdosfs_mkdir }, /* mkdir */
+ { &vop_rmdir_desc, (vop_t *)msdosfs_rmdir }, /* rmdir */
+ { &vop_symlink_desc, (vop_t *)msdosfs_symlink }, /* symlink */
+ { &vop_readdir_desc, (vop_t *)msdosfs_readdir }, /* readdir */
+ { &vop_readlink_desc, (vop_t *)msdosfs_readlink }, /* readlink */
+ { &vop_abortop_desc, (vop_t *)msdosfs_abortop }, /* abortop */
+ { &vop_inactive_desc, (vop_t *)msdosfs_inactive }, /* inactive */
+ { &vop_reclaim_desc, (vop_t *)msdosfs_reclaim }, /* reclaim */
+ { &vop_lock_desc, (vop_t *)msdosfs_lock }, /* lock */
+ { &vop_unlock_desc, (vop_t *)msdosfs_unlock }, /* unlock */
+ { &vop_bmap_desc, (vop_t *)msdosfs_bmap }, /* bmap */
+ { &vop_strategy_desc, (vop_t *)msdosfs_strategy }, /* strategy */
+ { &vop_print_desc, (vop_t *)msdosfs_print }, /* print */
+ { &vop_islocked_desc, (vop_t *)msdosfs_islocked }, /* islocked */
+ { &vop_pathconf_desc, (vop_t *)msdosfs_pathconf }, /* pathconf */
+ { &vop_advlock_desc, (vop_t *)msdosfs_advlock }, /* advlock */
+ { &vop_reallocblks_desc, (vop_t *)msdosfs_reallocblks }, /* reallocblks */
+ { &vop_bwrite_desc, (vop_t *)vn_bwrite }, /* bwrite */
+ { NULL, NULL }
};
static struct vnodeopv_desc msdosfs_vnodeop_opv_desc =
{ &msdosfs_vnodeop_p, msdosfs_vnodeop_entries };
OpenPOWER on IntegriCloud