1*0a6a1f1dSLionel Sambuc /* $NetBSD: v7fs_extern.c,v 1.4 2014/12/29 15:29:38 hannken Exp $ */
29f988b79SJean-Baptiste Boric
39f988b79SJean-Baptiste Boric /*-
49f988b79SJean-Baptiste Boric * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc.
59f988b79SJean-Baptiste Boric * All rights reserved.
69f988b79SJean-Baptiste Boric *
79f988b79SJean-Baptiste Boric * This code is derived from software contributed to The NetBSD Foundation
89f988b79SJean-Baptiste Boric * by UCHIYAMA Yasushi.
99f988b79SJean-Baptiste Boric *
109f988b79SJean-Baptiste Boric * Redistribution and use in source and binary forms, with or without
119f988b79SJean-Baptiste Boric * modification, are permitted provided that the following conditions
129f988b79SJean-Baptiste Boric * are met:
139f988b79SJean-Baptiste Boric * 1. Redistributions of source code must retain the above copyright
149f988b79SJean-Baptiste Boric * notice, this list of conditions and the following disclaimer.
159f988b79SJean-Baptiste Boric * 2. Redistributions in binary form must reproduce the above copyright
169f988b79SJean-Baptiste Boric * notice, this list of conditions and the following disclaimer in the
179f988b79SJean-Baptiste Boric * documentation and/or other materials provided with the distribution.
189f988b79SJean-Baptiste Boric *
199f988b79SJean-Baptiste Boric * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
209f988b79SJean-Baptiste Boric * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
219f988b79SJean-Baptiste Boric * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
229f988b79SJean-Baptiste Boric * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
239f988b79SJean-Baptiste Boric * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
249f988b79SJean-Baptiste Boric * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
259f988b79SJean-Baptiste Boric * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
269f988b79SJean-Baptiste Boric * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
279f988b79SJean-Baptiste Boric * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
289f988b79SJean-Baptiste Boric * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
299f988b79SJean-Baptiste Boric * POSSIBILITY OF SUCH DAMAGE.
309f988b79SJean-Baptiste Boric */
319f988b79SJean-Baptiste Boric
329f988b79SJean-Baptiste Boric #include <sys/cdefs.h>
33*0a6a1f1dSLionel Sambuc __KERNEL_RCSID(0, "$NetBSD: v7fs_extern.c,v 1.4 2014/12/29 15:29:38 hannken Exp $");
349f988b79SJean-Baptiste Boric
359f988b79SJean-Baptiste Boric #if defined _KERNEL_OPT
369f988b79SJean-Baptiste Boric #include "opt_v7fs.h"
379f988b79SJean-Baptiste Boric #endif
389f988b79SJean-Baptiste Boric #include <sys/resource.h>
399f988b79SJean-Baptiste Boric #include <sys/param.h>
409f988b79SJean-Baptiste Boric #include <sys/vnode.h>
419f988b79SJean-Baptiste Boric #include <sys/mount.h>
429f988b79SJean-Baptiste Boric #include <sys/module.h>
439f988b79SJean-Baptiste Boric
449f988b79SJean-Baptiste Boric #include <miscfs/fifofs/fifo.h>
459f988b79SJean-Baptiste Boric #include <miscfs/genfs/genfs.h>
469f988b79SJean-Baptiste Boric #include <miscfs/genfs/genfs_node.h>
479f988b79SJean-Baptiste Boric
489f988b79SJean-Baptiste Boric #include <fs/v7fs/v7fs_extern.h>
499f988b79SJean-Baptiste Boric
509f988b79SJean-Baptiste Boric MODULE(MODULE_CLASS_VFS, v7fs, NULL);
519f988b79SJean-Baptiste Boric
529f988b79SJean-Baptiste Boric /* External interfaces */
539f988b79SJean-Baptiste Boric
549f988b79SJean-Baptiste Boric int (**v7fs_vnodeop_p)(void *); /* filled by getnewvnode (vnode.h) */
559f988b79SJean-Baptiste Boric
569f988b79SJean-Baptiste Boric const struct vnodeopv_entry_desc v7fs_vnodeop_entries[] = {
579f988b79SJean-Baptiste Boric { &vop_default_desc, vn_default_error },
589f988b79SJean-Baptiste Boric { &vop_lookup_desc, v7fs_lookup }, /* lookup */
599f988b79SJean-Baptiste Boric { &vop_create_desc, v7fs_create }, /* create */
609f988b79SJean-Baptiste Boric { &vop_mknod_desc, v7fs_mknod }, /* mknod */
619f988b79SJean-Baptiste Boric { &vop_open_desc, v7fs_open }, /* open */
629f988b79SJean-Baptiste Boric { &vop_close_desc, v7fs_close }, /* close */
639f988b79SJean-Baptiste Boric { &vop_access_desc, v7fs_access }, /* access */
649f988b79SJean-Baptiste Boric { &vop_getattr_desc, v7fs_getattr }, /* getattr */
659f988b79SJean-Baptiste Boric { &vop_setattr_desc, v7fs_setattr }, /* setattr */
669f988b79SJean-Baptiste Boric { &vop_read_desc, v7fs_read }, /* read */
679f988b79SJean-Baptiste Boric { &vop_write_desc, v7fs_write }, /* write */
68*0a6a1f1dSLionel Sambuc { &vop_fallocate_desc, genfs_eopnotsupp }, /* fallocate */
69*0a6a1f1dSLionel Sambuc { &vop_fdiscard_desc, genfs_eopnotsupp }, /* fdiscard */
709f988b79SJean-Baptiste Boric { &vop_fcntl_desc, genfs_fcntl }, /* fcntl */
719f988b79SJean-Baptiste Boric { &vop_ioctl_desc, genfs_enoioctl }, /* ioctl */
729f988b79SJean-Baptiste Boric { &vop_poll_desc, genfs_poll }, /* poll */
739f988b79SJean-Baptiste Boric { &vop_kqfilter_desc, genfs_kqfilter }, /* kqfilter */
749f988b79SJean-Baptiste Boric { &vop_revoke_desc, genfs_revoke }, /* revoke */
759f988b79SJean-Baptiste Boric { &vop_mmap_desc, genfs_mmap }, /* mmap */
769f988b79SJean-Baptiste Boric { &vop_fsync_desc, v7fs_fsync }, /* fsync */
779f988b79SJean-Baptiste Boric { &vop_seek_desc, genfs_seek }, /* seek */
789f988b79SJean-Baptiste Boric { &vop_remove_desc, v7fs_remove }, /* remove */
799f988b79SJean-Baptiste Boric { &vop_link_desc, v7fs_link }, /* link */
809f988b79SJean-Baptiste Boric { &vop_rename_desc, v7fs_rename }, /* rename */
819f988b79SJean-Baptiste Boric { &vop_mkdir_desc, v7fs_mkdir }, /* mkdir */
829f988b79SJean-Baptiste Boric { &vop_rmdir_desc, v7fs_rmdir }, /* rmdir */
839f988b79SJean-Baptiste Boric { &vop_symlink_desc, v7fs_symlink }, /* symlink */
849f988b79SJean-Baptiste Boric { &vop_readdir_desc, v7fs_readdir }, /* readdir */
859f988b79SJean-Baptiste Boric { &vop_readlink_desc, v7fs_readlink }, /* readlink */
869f988b79SJean-Baptiste Boric { &vop_abortop_desc, genfs_abortop }, /* abortop */
879f988b79SJean-Baptiste Boric { &vop_inactive_desc, v7fs_inactive }, /* inactive */
889f988b79SJean-Baptiste Boric { &vop_reclaim_desc, v7fs_reclaim }, /* reclaim */
899f988b79SJean-Baptiste Boric { &vop_lock_desc, genfs_lock }, /* lock */
909f988b79SJean-Baptiste Boric { &vop_unlock_desc, genfs_unlock }, /* unlock */
919f988b79SJean-Baptiste Boric { &vop_bmap_desc, v7fs_bmap }, /* bmap */
929f988b79SJean-Baptiste Boric { &vop_strategy_desc, v7fs_strategy }, /* strategy */
939f988b79SJean-Baptiste Boric { &vop_print_desc, v7fs_print }, /* print */
949f988b79SJean-Baptiste Boric { &vop_islocked_desc, genfs_islocked }, /* islocked */
959f988b79SJean-Baptiste Boric { &vop_pathconf_desc, v7fs_pathconf }, /* pathconf */
969f988b79SJean-Baptiste Boric { &vop_advlock_desc, v7fs_advlock }, /* advlock */
979f988b79SJean-Baptiste Boric { &vop_bwrite_desc, vn_bwrite }, /* bwrite */
989f988b79SJean-Baptiste Boric { &vop_getpages_desc, genfs_getpages }, /* getpages */
999f988b79SJean-Baptiste Boric { &vop_putpages_desc, genfs_putpages }, /* putpages */
1009f988b79SJean-Baptiste Boric { NULL, NULL }
1019f988b79SJean-Baptiste Boric };
1029f988b79SJean-Baptiste Boric
1039f988b79SJean-Baptiste Boric
1049f988b79SJean-Baptiste Boric int (**v7fs_specop_p)(void *);
1059f988b79SJean-Baptiste Boric const struct vnodeopv_entry_desc v7fs_specop_entries[] = {
1069f988b79SJean-Baptiste Boric { &vop_default_desc, vn_default_error },
1079f988b79SJean-Baptiste Boric { &vop_lookup_desc, spec_lookup }, /* lookup */
1089f988b79SJean-Baptiste Boric { &vop_create_desc, spec_create }, /* create xxx*/
1099f988b79SJean-Baptiste Boric { &vop_mknod_desc, spec_mknod }, /* mknod xxx*/
1109f988b79SJean-Baptiste Boric { &vop_open_desc, spec_open }, /* open */
1119f988b79SJean-Baptiste Boric { &vop_close_desc, spec_close }, /* close */
1129f988b79SJean-Baptiste Boric { &vop_access_desc, v7fs_access }, /* access */
1139f988b79SJean-Baptiste Boric { &vop_getattr_desc, v7fs_getattr }, /* getattr */
1149f988b79SJean-Baptiste Boric { &vop_setattr_desc, v7fs_setattr }, /* setattr */
1159f988b79SJean-Baptiste Boric { &vop_read_desc, spec_read }, /* read */
1169f988b79SJean-Baptiste Boric { &vop_write_desc, spec_write }, /* write */
117*0a6a1f1dSLionel Sambuc { &vop_fallocate_desc, spec_fallocate }, /* fallocate */
118*0a6a1f1dSLionel Sambuc { &vop_fdiscard_desc, spec_fdiscard }, /* fdiscard */
1199f988b79SJean-Baptiste Boric { &vop_ioctl_desc, spec_ioctl }, /* ioctl */
1209f988b79SJean-Baptiste Boric { &vop_fcntl_desc, genfs_fcntl }, /* fcntl */
1219f988b79SJean-Baptiste Boric { &vop_poll_desc, spec_poll }, /* poll */
1229f988b79SJean-Baptiste Boric { &vop_kqfilter_desc, spec_kqfilter }, /* kqfilter */
1239f988b79SJean-Baptiste Boric { &vop_revoke_desc, spec_revoke }, /* revoke */
1249f988b79SJean-Baptiste Boric { &vop_mmap_desc, spec_mmap }, /* mmap */
1259f988b79SJean-Baptiste Boric { &vop_fsync_desc, spec_fsync }, /* fsync */
1269f988b79SJean-Baptiste Boric { &vop_seek_desc, spec_seek }, /* seek */
1279f988b79SJean-Baptiste Boric { &vop_remove_desc, spec_remove }, /* remove */
1289f988b79SJean-Baptiste Boric { &vop_link_desc, spec_link }, /* link */
1299f988b79SJean-Baptiste Boric { &vop_rename_desc, spec_rename }, /* rename */
1309f988b79SJean-Baptiste Boric { &vop_mkdir_desc, spec_mkdir }, /* mkdir */
1319f988b79SJean-Baptiste Boric { &vop_rmdir_desc, spec_rmdir }, /* rmdir */
1329f988b79SJean-Baptiste Boric { &vop_symlink_desc, spec_symlink }, /* symlink */
1339f988b79SJean-Baptiste Boric { &vop_readdir_desc, spec_readdir }, /* readdir */
1349f988b79SJean-Baptiste Boric { &vop_readlink_desc, spec_readlink }, /* readlink */
1359f988b79SJean-Baptiste Boric { &vop_abortop_desc, spec_abortop }, /* abortop */
1369f988b79SJean-Baptiste Boric { &vop_inactive_desc, v7fs_inactive }, /* inactive */
1379f988b79SJean-Baptiste Boric { &vop_reclaim_desc, v7fs_reclaim }, /* reclaim */
1389f988b79SJean-Baptiste Boric { &vop_lock_desc, genfs_lock }, /* lock */
1399f988b79SJean-Baptiste Boric { &vop_unlock_desc, genfs_unlock }, /* unlock */
1409f988b79SJean-Baptiste Boric { &vop_bmap_desc, spec_bmap }, /* bmap */
1419f988b79SJean-Baptiste Boric { &vop_strategy_desc, spec_strategy }, /* strategy */
1429f988b79SJean-Baptiste Boric { &vop_print_desc, spec_print }, /* print */
1439f988b79SJean-Baptiste Boric { &vop_islocked_desc, genfs_islocked }, /* islocked */
1449f988b79SJean-Baptiste Boric { &vop_pathconf_desc, spec_pathconf }, /* pathconf */
1459f988b79SJean-Baptiste Boric { &vop_advlock_desc, spec_advlock }, /* advlock */
1469f988b79SJean-Baptiste Boric { &vop_bwrite_desc, vn_bwrite }, /* bwrite */
1479f988b79SJean-Baptiste Boric { &vop_getpages_desc, spec_getpages }, /* getpages */
1489f988b79SJean-Baptiste Boric { &vop_putpages_desc, spec_putpages }, /* putpages */
1499f988b79SJean-Baptiste Boric { NULL, NULL }
1509f988b79SJean-Baptiste Boric };
1519f988b79SJean-Baptiste Boric
1529f988b79SJean-Baptiste Boric int (**v7fs_fifoop_p)(void *);
1539f988b79SJean-Baptiste Boric const struct vnodeopv_entry_desc v7fs_fifoop_entries[] = {
1549f988b79SJean-Baptiste Boric { &vop_default_desc, vn_default_error },
1559f988b79SJean-Baptiste Boric { &vop_lookup_desc, vn_fifo_bypass }, /* lookup */
1569f988b79SJean-Baptiste Boric { &vop_create_desc, vn_fifo_bypass }, /* create */
1579f988b79SJean-Baptiste Boric { &vop_mknod_desc, vn_fifo_bypass }, /* mknod */
1589f988b79SJean-Baptiste Boric { &vop_open_desc, vn_fifo_bypass }, /* open */
1599f988b79SJean-Baptiste Boric { &vop_close_desc, vn_fifo_bypass }, /* close */
1609f988b79SJean-Baptiste Boric { &vop_access_desc, v7fs_access }, /* access */
1619f988b79SJean-Baptiste Boric { &vop_getattr_desc, v7fs_getattr }, /* getattr */
1629f988b79SJean-Baptiste Boric { &vop_setattr_desc, v7fs_setattr }, /* setattr */
1639f988b79SJean-Baptiste Boric { &vop_read_desc, vn_fifo_bypass }, /* read */
1649f988b79SJean-Baptiste Boric { &vop_write_desc, vn_fifo_bypass }, /* write */
165*0a6a1f1dSLionel Sambuc { &vop_fallocate_desc, vn_fifo_bypass }, /* fallocate */
166*0a6a1f1dSLionel Sambuc { &vop_fdiscard_desc, vn_fifo_bypass }, /* fdiscard */
1679f988b79SJean-Baptiste Boric { &vop_ioctl_desc, vn_fifo_bypass }, /* ioctl */
1689f988b79SJean-Baptiste Boric { &vop_fcntl_desc, genfs_fcntl }, /* fcntl */
1699f988b79SJean-Baptiste Boric { &vop_poll_desc, vn_fifo_bypass }, /* poll */
1709f988b79SJean-Baptiste Boric { &vop_kqfilter_desc, vn_fifo_bypass }, /* kqfilter */
1719f988b79SJean-Baptiste Boric { &vop_revoke_desc, vn_fifo_bypass }, /* revoke */
1729f988b79SJean-Baptiste Boric { &vop_mmap_desc, vn_fifo_bypass }, /* mmap */
1739f988b79SJean-Baptiste Boric { &vop_fsync_desc, vn_fifo_bypass }, /* fsync */
1749f988b79SJean-Baptiste Boric { &vop_seek_desc, vn_fifo_bypass }, /* seek */
1759f988b79SJean-Baptiste Boric { &vop_remove_desc, vn_fifo_bypass }, /* remove */
1769f988b79SJean-Baptiste Boric { &vop_link_desc, vn_fifo_bypass }, /* link */
1779f988b79SJean-Baptiste Boric { &vop_rename_desc, vn_fifo_bypass }, /* rename */
1789f988b79SJean-Baptiste Boric { &vop_mkdir_desc, vn_fifo_bypass }, /* mkdir */
1799f988b79SJean-Baptiste Boric { &vop_rmdir_desc, vn_fifo_bypass }, /* rmdir */
1809f988b79SJean-Baptiste Boric { &vop_symlink_desc, vn_fifo_bypass }, /* symlink */
1819f988b79SJean-Baptiste Boric { &vop_readdir_desc, vn_fifo_bypass }, /* readdir */
1829f988b79SJean-Baptiste Boric { &vop_readlink_desc, vn_fifo_bypass }, /* readlink */
1839f988b79SJean-Baptiste Boric { &vop_abortop_desc, vn_fifo_bypass }, /* abortop */
1849f988b79SJean-Baptiste Boric { &vop_inactive_desc, v7fs_inactive }, /* inactive */
1859f988b79SJean-Baptiste Boric { &vop_reclaim_desc, v7fs_reclaim }, /* reclaim */
1869f988b79SJean-Baptiste Boric { &vop_lock_desc, vn_fifo_bypass }, /* lock */
1879f988b79SJean-Baptiste Boric { &vop_unlock_desc, vn_fifo_bypass }, /* unlock */
1889f988b79SJean-Baptiste Boric { &vop_bmap_desc, vn_fifo_bypass }, /* bmap */
1899f988b79SJean-Baptiste Boric { &vop_strategy_desc, vn_fifo_bypass }, /* strategy */
1909f988b79SJean-Baptiste Boric { &vop_print_desc, vn_fifo_bypass }, /* print */
1919f988b79SJean-Baptiste Boric { &vop_islocked_desc, vn_fifo_bypass }, /* islocked */
1929f988b79SJean-Baptiste Boric { &vop_pathconf_desc, vn_fifo_bypass }, /* pathconf */
1939f988b79SJean-Baptiste Boric { &vop_advlock_desc, vn_fifo_bypass }, /* advlock */
1949f988b79SJean-Baptiste Boric { &vop_bwrite_desc, vn_bwrite }, /* bwrite */
1959f988b79SJean-Baptiste Boric { &vop_putpages_desc, vn_fifo_bypass }, /* putpages */
1969f988b79SJean-Baptiste Boric { NULL, NULL }
1979f988b79SJean-Baptiste Boric };
1989f988b79SJean-Baptiste Boric
1999f988b79SJean-Baptiste Boric const struct vnodeopv_desc v7fs_fifoop_opv_desc = {
2009f988b79SJean-Baptiste Boric &v7fs_fifoop_p,
2019f988b79SJean-Baptiste Boric v7fs_fifoop_entries
2029f988b79SJean-Baptiste Boric };
2039f988b79SJean-Baptiste Boric
2049f988b79SJean-Baptiste Boric const struct vnodeopv_desc v7fs_vnodeop_opv_desc = {
2059f988b79SJean-Baptiste Boric &v7fs_vnodeop_p,
2069f988b79SJean-Baptiste Boric v7fs_vnodeop_entries
2079f988b79SJean-Baptiste Boric };
2089f988b79SJean-Baptiste Boric
2099f988b79SJean-Baptiste Boric const struct vnodeopv_desc v7fs_specop_opv_desc = {
2109f988b79SJean-Baptiste Boric &v7fs_specop_p,
2119f988b79SJean-Baptiste Boric v7fs_specop_entries
2129f988b79SJean-Baptiste Boric };
2139f988b79SJean-Baptiste Boric
2149f988b79SJean-Baptiste Boric const struct vnodeopv_desc *v7fs_vnodeopv_descs[] = {
2159f988b79SJean-Baptiste Boric &v7fs_vnodeop_opv_desc,
2169f988b79SJean-Baptiste Boric &v7fs_specop_opv_desc,
2179f988b79SJean-Baptiste Boric &v7fs_fifoop_opv_desc,
2189f988b79SJean-Baptiste Boric NULL,
2199f988b79SJean-Baptiste Boric };
2209f988b79SJean-Baptiste Boric
2219f988b79SJean-Baptiste Boric const struct genfs_ops v7fs_genfsops = {
2229f988b79SJean-Baptiste Boric .gop_size = genfs_size,
2239f988b79SJean-Baptiste Boric .gop_alloc = v7fs_gop_alloc,
2249f988b79SJean-Baptiste Boric .gop_write = genfs_gop_write,
2259f988b79SJean-Baptiste Boric };
2269f988b79SJean-Baptiste Boric
2279f988b79SJean-Baptiste Boric struct vfsops v7fs_vfsops = {
228*0a6a1f1dSLionel Sambuc .vfs_name = MOUNT_V7FS,
229*0a6a1f1dSLionel Sambuc .vfs_min_mount_data = sizeof(struct v7fs_args),
230*0a6a1f1dSLionel Sambuc .vfs_mount = v7fs_mount,
231*0a6a1f1dSLionel Sambuc .vfs_start = v7fs_start,
232*0a6a1f1dSLionel Sambuc .vfs_unmount = v7fs_unmount,
233*0a6a1f1dSLionel Sambuc .vfs_root = v7fs_root,
234*0a6a1f1dSLionel Sambuc .vfs_quotactl = (void *)eopnotsupp,
235*0a6a1f1dSLionel Sambuc .vfs_statvfs = v7fs_statvfs,
236*0a6a1f1dSLionel Sambuc .vfs_sync = v7fs_sync,
237*0a6a1f1dSLionel Sambuc .vfs_vget = v7fs_vget,
238*0a6a1f1dSLionel Sambuc .vfs_loadvnode = v7fs_loadvnode,
239*0a6a1f1dSLionel Sambuc .vfs_fhtovp = v7fs_fhtovp,
240*0a6a1f1dSLionel Sambuc .vfs_vptofh = v7fs_vptofh,
241*0a6a1f1dSLionel Sambuc .vfs_init = v7fs_init,
242*0a6a1f1dSLionel Sambuc .vfs_reinit = v7fs_reinit,
243*0a6a1f1dSLionel Sambuc .vfs_done = v7fs_done,
244*0a6a1f1dSLionel Sambuc .vfs_mountroot = v7fs_mountroot,
245*0a6a1f1dSLionel Sambuc .vfs_snapshot = (void *)eopnotsupp,
246*0a6a1f1dSLionel Sambuc .vfs_extattrctl = vfs_stdextattrctl,
247*0a6a1f1dSLionel Sambuc .vfs_suspendctl = (void *)eopnotsupp,
248*0a6a1f1dSLionel Sambuc .vfs_renamelock_enter = genfs_renamelock_enter,
249*0a6a1f1dSLionel Sambuc .vfs_renamelock_exit = genfs_renamelock_exit,
250*0a6a1f1dSLionel Sambuc .vfs_fsync = (void *)eopnotsupp,
251*0a6a1f1dSLionel Sambuc .vfs_opv_descs = v7fs_vnodeopv_descs
2529f988b79SJean-Baptiste Boric };
2539f988b79SJean-Baptiste Boric
2549f988b79SJean-Baptiste Boric static int
v7fs_modcmd(modcmd_t cmd,void * arg)2559f988b79SJean-Baptiste Boric v7fs_modcmd(modcmd_t cmd, void *arg)
2569f988b79SJean-Baptiste Boric {
2579f988b79SJean-Baptiste Boric
2589f988b79SJean-Baptiste Boric switch (cmd) {
2599f988b79SJean-Baptiste Boric case MODULE_CMD_INIT:
2609f988b79SJean-Baptiste Boric return vfs_attach(&v7fs_vfsops);
2619f988b79SJean-Baptiste Boric case MODULE_CMD_FINI:
2629f988b79SJean-Baptiste Boric return vfs_detach(&v7fs_vfsops);
2639f988b79SJean-Baptiste Boric default:
2649f988b79SJean-Baptiste Boric return ENOTTY;
2659f988b79SJean-Baptiste Boric }
2669f988b79SJean-Baptiste Boric }
267