1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 13 unchanged lines hidden (view full) ---
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
30 * $FreeBSD: head/sys/fs/deadfs/dead_vnops.c 155896 2006-02-22 06:11:59Z jeff $
31 */
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/lock.h>
37#include <sys/mutex.h>
38#include <sys/poll.h>
--- 4 unchanged lines hidden (view full) ---
43 */
44static vop_bmap_t dead_bmap;
45static vop_ioctl_t dead_ioctl;
46static vop_lookup_t dead_lookup;
47static vop_open_t dead_open;
48static vop_poll_t dead_poll;
49static vop_read_t dead_read;
50static vop_write_t dead_write;
51static vop_getwritemount_t dead_getwritemount;
52
53struct vop_vector dead_vnodeops = {
54 .vop_default = &default_vnodeops,
55
56 .vop_access = VOP_EBADF,
57 .vop_advlock = VOP_EBADF,
58 .vop_bmap = dead_bmap,
59 .vop_create = VOP_PANIC,
60 .vop_getattr = VOP_EBADF,
61 .vop_getwritemount = dead_getwritemount,
62 .vop_inactive = VOP_NULL,
63 .vop_ioctl = dead_ioctl,
64 .vop_link = VOP_PANIC,
65 .vop_lookup = dead_lookup,
66 .vop_mkdir = VOP_PANIC,
67 .vop_mknod = VOP_PANIC,
68 .vop_open = dead_open,
69 .vop_pathconf = VOP_EBADF, /* per pathconf(2) */
--- 5 unchanged lines hidden (view full) ---
75 .vop_remove = VOP_PANIC,
76 .vop_rename = VOP_PANIC,
77 .vop_rmdir = VOP_PANIC,
78 .vop_setattr = VOP_EBADF,
79 .vop_symlink = VOP_PANIC,
80 .vop_write = dead_write,
81};
82
83/* ARGSUSED */
84static int
85dead_getwritemount(ap)
86 struct vop_getwritemount_args /* {
87 struct vnode *a_vp;
88 struct mount **a_mpp;
89 } */ *ap;
90{
91 *(ap->a_mpp) = NULL;
92 return (0);
93}
94
95/*
96 * Trivial lookup routine that always fails.
97 */
98/* ARGSUSED */
99static int
100dead_lookup(ap)
101 struct vop_lookup_args /* {
102 struct vnode * a_dvp;
--- 111 unchanged lines hidden ---
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 13 unchanged lines hidden (view full) ---
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
30 * $FreeBSD: head/sys/fs/deadfs/dead_vnops.c 155896 2006-02-22 06:11:59Z jeff $
31 */
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/lock.h>
37#include <sys/mutex.h>
38#include <sys/poll.h>
--- 4 unchanged lines hidden (view full) ---
43 */
44static vop_bmap_t dead_bmap;
45static vop_ioctl_t dead_ioctl;
46static vop_lookup_t dead_lookup;
47static vop_open_t dead_open;
48static vop_poll_t dead_poll;
49static vop_read_t dead_read;
50static vop_write_t dead_write;
51static vop_getwritemount_t dead_getwritemount;
52
53struct vop_vector dead_vnodeops = {
54 .vop_default = &default_vnodeops,
55
56 .vop_access = VOP_EBADF,
57 .vop_advlock = VOP_EBADF,
58 .vop_bmap = dead_bmap,
59 .vop_create = VOP_PANIC,
60 .vop_getattr = VOP_EBADF,
61 .vop_getwritemount = dead_getwritemount,
62 .vop_inactive = VOP_NULL,
63 .vop_ioctl = dead_ioctl,
64 .vop_link = VOP_PANIC,
65 .vop_lookup = dead_lookup,
66 .vop_mkdir = VOP_PANIC,
67 .vop_mknod = VOP_PANIC,
68 .vop_open = dead_open,
69 .vop_pathconf = VOP_EBADF, /* per pathconf(2) */
--- 5 unchanged lines hidden (view full) ---
75 .vop_remove = VOP_PANIC,
76 .vop_rename = VOP_PANIC,
77 .vop_rmdir = VOP_PANIC,
78 .vop_setattr = VOP_EBADF,
79 .vop_symlink = VOP_PANIC,
80 .vop_write = dead_write,
81};
82
83/* ARGSUSED */
84static int
85dead_getwritemount(ap)
86 struct vop_getwritemount_args /* {
87 struct vnode *a_vp;
88 struct mount **a_mpp;
89 } */ *ap;
90{
91 *(ap->a_mpp) = NULL;
92 return (0);
93}
94
95/*
96 * Trivial lookup routine that always fails.
97 */
98/* ARGSUSED */
99static int
100dead_lookup(ap)
101 struct vop_lookup_args /* {
102 struct vnode * a_dvp;
--- 111 unchanged lines hidden ---