dead_vnops.c (30496) | dead_vnops.c (30743) |
---|---|
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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93 | 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93 |
34 * $Id: dead_vnops.c,v 1.19 1997/10/16 20:32:24 phk Exp $ | 34 * $Id: dead_vnops.c,v 1.20 1997/10/16 21:59:55 phk Exp $ |
35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/kernel.h> 40#include <sys/vnode.h> 41#include <sys/buf.h> 42 43static int chkvnlock __P((struct vnode *)); 44/* 45 * Prototypes for dead operations on vnodes. 46 */ 47static int dead_badop __P((void)); | 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/kernel.h> 40#include <sys/vnode.h> 41#include <sys/buf.h> 42 43static int chkvnlock __P((struct vnode *)); 44/* 45 * Prototypes for dead operations on vnodes. 46 */ 47static int dead_badop __P((void)); |
48static int dead_ebadf __P((void)); | |
49static int dead_lookup __P((struct vop_lookup_args *)); 50static int dead_open __P((struct vop_open_args *)); 51static int dead_read __P((struct vop_read_args *)); 52static int dead_write __P((struct vop_write_args *)); 53static int dead_ioctl __P((struct vop_ioctl_args *)); 54static int dead_lock __P((struct vop_lock_args *)); 55static int dead_bmap __P((struct vop_bmap_args *)); 56static int dead_print __P((struct vop_print_args *)); 57 58vop_t **dead_vnodeop_p; 59static struct vnodeopv_entry_desc dead_vnodeop_entries[] = { | 48static int dead_lookup __P((struct vop_lookup_args *)); 49static int dead_open __P((struct vop_open_args *)); 50static int dead_read __P((struct vop_read_args *)); 51static int dead_write __P((struct vop_write_args *)); 52static int dead_ioctl __P((struct vop_ioctl_args *)); 53static int dead_lock __P((struct vop_lock_args *)); 54static int dead_bmap __P((struct vop_bmap_args *)); 55static int dead_print __P((struct vop_print_args *)); 56 57vop_t **dead_vnodeop_p; 58static struct vnodeopv_entry_desc dead_vnodeop_entries[] = { |
60 { &vop_default_desc, (vop_t *) vn_default_error }, 61 { &vop_access_desc, (vop_t *) dead_ebadf }, 62 { &vop_advlock_desc, (vop_t *) dead_ebadf }, | 59 { &vop_default_desc, (vop_t *) vop_defaultop }, 60 { &vop_access_desc, (vop_t *) vop_ebadf }, 61 { &vop_advlock_desc, (vop_t *) vop_ebadf }, |
63 { &vop_bmap_desc, (vop_t *) dead_bmap }, 64 { &vop_create_desc, (vop_t *) dead_badop }, | 62 { &vop_bmap_desc, (vop_t *) dead_bmap }, 63 { &vop_create_desc, (vop_t *) dead_badop }, |
65 { &vop_getattr_desc, (vop_t *) dead_ebadf }, 66 { &vop_inactive_desc, (vop_t *) nullop }, | 64 { &vop_getattr_desc, (vop_t *) vop_ebadf }, 65 { &vop_inactive_desc, (vop_t *) vop_null }, |
67 { &vop_ioctl_desc, (vop_t *) dead_ioctl }, 68 { &vop_link_desc, (vop_t *) dead_badop }, 69 { &vop_lock_desc, (vop_t *) dead_lock }, 70 { &vop_lookup_desc, (vop_t *) dead_lookup }, 71 { &vop_mkdir_desc, (vop_t *) dead_badop }, 72 { &vop_mknod_desc, (vop_t *) dead_badop }, 73 { &vop_mmap_desc, (vop_t *) dead_badop }, 74 { &vop_open_desc, (vop_t *) dead_open }, | 66 { &vop_ioctl_desc, (vop_t *) dead_ioctl }, 67 { &vop_link_desc, (vop_t *) dead_badop }, 68 { &vop_lock_desc, (vop_t *) dead_lock }, 69 { &vop_lookup_desc, (vop_t *) dead_lookup }, 70 { &vop_mkdir_desc, (vop_t *) dead_badop }, 71 { &vop_mknod_desc, (vop_t *) dead_badop }, 72 { &vop_mmap_desc, (vop_t *) dead_badop }, 73 { &vop_open_desc, (vop_t *) dead_open }, |
75 { &vop_pathconf_desc, (vop_t *) dead_ebadf }, /* per pathconf(2) */ | 74 { &vop_pathconf_desc, (vop_t *) vop_ebadf }, /* per pathconf(2) */ |
76 { &vop_print_desc, (vop_t *) dead_print }, 77 { &vop_read_desc, (vop_t *) dead_read }, | 75 { &vop_print_desc, (vop_t *) dead_print }, 76 { &vop_read_desc, (vop_t *) dead_read }, |
78 { &vop_readdir_desc, (vop_t *) dead_ebadf }, 79 { &vop_readlink_desc, (vop_t *) dead_ebadf }, 80 { &vop_reclaim_desc, (vop_t *) nullop }, | 77 { &vop_readdir_desc, (vop_t *) vop_ebadf }, 78 { &vop_readlink_desc, (vop_t *) vop_ebadf }, 79 { &vop_reclaim_desc, (vop_t *) vop_null }, |
81 { &vop_remove_desc, (vop_t *) dead_badop }, 82 { &vop_rename_desc, (vop_t *) dead_badop }, 83 { &vop_rmdir_desc, (vop_t *) dead_badop }, | 80 { &vop_remove_desc, (vop_t *) dead_badop }, 81 { &vop_rename_desc, (vop_t *) dead_badop }, 82 { &vop_rmdir_desc, (vop_t *) dead_badop }, |
84 { &vop_setattr_desc, (vop_t *) dead_ebadf }, | 83 { &vop_setattr_desc, (vop_t *) vop_ebadf }, |
85 { &vop_symlink_desc, (vop_t *) dead_badop }, 86 { &vop_write_desc, (vop_t *) dead_write }, 87 { NULL, NULL } 88}; 89static struct vnodeopv_desc dead_vnodeop_opv_desc = 90 { &dead_vnodeop_p, dead_vnodeop_entries }; 91 92VNODEOP_SET(dead_vnodeop_opv_desc); --- 163 unchanged lines hidden (view full) --- 256 } */ *ap; 257{ 258 259 printf("tag VT_NON, dead vnode\n"); 260 return (0); 261} 262 263/* | 84 { &vop_symlink_desc, (vop_t *) dead_badop }, 85 { &vop_write_desc, (vop_t *) dead_write }, 86 { NULL, NULL } 87}; 88static struct vnodeopv_desc dead_vnodeop_opv_desc = 89 { &dead_vnodeop_p, dead_vnodeop_entries }; 90 91VNODEOP_SET(dead_vnodeop_opv_desc); --- 163 unchanged lines hidden (view full) --- 255 } */ *ap; 256{ 257 258 printf("tag VT_NON, dead vnode\n"); 259 return (0); 260} 261 262/* |
264 * Empty vnode failed operation 265 */ 266static int 267dead_ebadf() 268{ 269 270 return (EBADF); 271} 272 273/* | |
274 * Empty vnode bad operation 275 */ 276static int 277dead_badop() 278{ 279 280 panic("dead_badop called"); 281 /* NOTREACHED */ --- 19 unchanged lines hidden --- | 263 * Empty vnode bad operation 264 */ 265static int 266dead_badop() 267{ 268 269 panic("dead_badop called"); 270 /* NOTREACHED */ --- 19 unchanged lines hidden --- |