Annotation of src/sys/miscfs/nullfs/null_vnops.c, Revision 1.35
1.35 ! rmind 1: /* $NetBSD: null_vnops.c,v 1.34 2005/12/11 12:24:51 christos Exp $ */
1.2 cgd 2:
1.1 mycroft 3: /*
1.16 wrstuden 4: * Copyright (c) 1999 National Aeronautics & Space Administration
5: * All rights reserved.
6: *
7: * This software was written by William Studenmund of the
1.19 wiz 8: * Numerical Aerospace Simulation Facility, NASA Ames Research Center.
1.16 wrstuden 9: *
10: * Redistribution and use in source and binary forms, with or without
11: * modification, are permitted provided that the following conditions
12: * are met:
13: * 1. Redistributions of source code must retain the above copyright
14: * notice, this list of conditions and the following disclaimer.
15: * 2. Redistributions in binary form must reproduce the above copyright
16: * notice, this list of conditions and the following disclaimer in the
17: * documentation and/or other materials provided with the distribution.
1.17 soren 18: * 3. Neither the name of the National Aeronautics & Space Administration
1.16 wrstuden 19: * nor the names of its contributors may be used to endorse or promote
20: * products derived from this software without specific prior written
21: * permission.
22: *
23: * THIS SOFTWARE IS PROVIDED BY THE NATIONAL AERONAUTICS & SPACE ADMINISTRATION
24: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25: * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26: * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ADMINISTRATION OR CONTRIB-
27: * UTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
28: * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33: * POSSIBILITY OF SUCH DAMAGE.
34: */
1.35 ! rmind 35:
1.16 wrstuden 36: /*
1.1 mycroft 37: * Copyright (c) 1992, 1993
38: * The Regents of the University of California. All rights reserved.
39: *
40: * This code is derived from software contributed to Berkeley by
41: * John Heidemann of the UCLA Ficus project.
42: *
43: * Redistribution and use in source and binary forms, with or without
44: * modification, are permitted provided that the following conditions
45: * are met:
46: * 1. Redistributions of source code must retain the above copyright
47: * notice, this list of conditions and the following disclaimer.
48: * 2. Redistributions in binary form must reproduce the above copyright
49: * notice, this list of conditions and the following disclaimer in the
50: * documentation and/or other materials provided with the distribution.
1.27 agc 51: * 3. Neither the name of the University nor the names of its contributors
1.1 mycroft 52: * may be used to endorse or promote products derived from this software
53: * without specific prior written permission.
54: *
55: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
56: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
57: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
58: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
59: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
60: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
61: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
62: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
63: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
64: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
65: * SUCH DAMAGE.
66: *
1.13 fvdl 67: * @(#)null_vnops.c 8.6 (Berkeley) 5/27/95
1.1 mycroft 68: *
69: * Ancestors:
70: * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92
1.32 perry 71: * Id: lofs_vnops.c,v 1.11 1992/05/30 10:05:43 jsp Exp jsp
1.1 mycroft 72: * ...and...
73: * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project
74: */
75:
76: /*
1.35 ! rmind 77: * Null file-system.
1.1 mycroft 78: *
1.35 ! rmind 79: * Implemented using layerfs, see layer_vnops.c for a description.
1.1 mycroft 80: */
1.22 lukem 81:
82: #include <sys/cdefs.h>
1.35 ! rmind 83: __KERNEL_RCSID(0, "$NetBSD: null_vnops.c,v 1.34 2005/12/11 12:24:51 christos Exp $");
1.1 mycroft 84:
85: #include <sys/param.h>
86: #include <sys/systm.h>
87: #include <sys/vnode.h>
1.35 ! rmind 88:
1.16 wrstuden 89: #include <miscfs/genfs/genfs.h>
1.35 ! rmind 90: #include <miscfs/genfs/layer_extern.h>
1.1 mycroft 91: #include <miscfs/nullfs/null.h>
92:
93: /*
1.35 ! rmind 94: * Global VFS data structures.
1.1 mycroft 95: */
1.35 ! rmind 96:
1.33 xtraeme 97: int (**null_vnodeop_p)(void *);
1.35 ! rmind 98:
1.18 jdolecek 99: const struct vnodeopv_entry_desc null_vnodeop_entries[] = {
1.35 ! rmind 100: { &vop_default_desc, layer_bypass },
1.1 mycroft 101:
1.35 ! rmind 102: { &vop_lookup_desc, layer_lookup },
! 103: { &vop_setattr_desc, layer_setattr },
! 104: { &vop_getattr_desc, layer_getattr },
! 105: { &vop_access_desc, layer_access },
! 106: { &vop_lock_desc, layer_lock },
! 107: { &vop_unlock_desc, layer_unlock },
! 108: { &vop_islocked_desc, layer_islocked },
! 109: { &vop_fsync_desc, layer_fsync },
! 110: { &vop_inactive_desc, layer_inactive },
! 111: { &vop_reclaim_desc, layer_reclaim },
! 112: { &vop_print_desc, layer_print },
! 113: { &vop_remove_desc, layer_remove },
! 114: { &vop_rename_desc, layer_rename },
! 115: { &vop_rmdir_desc, layer_rmdir },
! 116:
! 117: { &vop_open_desc, layer_open }, /* mount option handling */
! 118:
! 119: { &vop_bwrite_desc, layer_bwrite },
! 120: { &vop_bmap_desc, layer_bmap },
! 121: { &vop_getpages_desc, layer_getpages },
! 122: { &vop_putpages_desc, layer_putpages },
1.1 mycroft 123:
1.24 chs 124: { NULL, NULL }
1.1 mycroft 125: };
1.35 ! rmind 126:
! 127: const struct vnodeopv_desc null_vnodeop_opv_desc = {
! 128: &null_vnodeop_p, null_vnodeop_entries
! 129: };
CVSweb <webmaster@jp.NetBSD.org>