Deleted Added
full compact
fdesc_vnops.c (77031) fdesc_vnops.c (78240)
1/*
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software donated to Berkeley by
6 * Jan-Simon Pendry.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 21 unchanged lines hidden (view full) ---

30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
37 *
1/*
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software donated to Berkeley by
6 * Jan-Simon Pendry.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 21 unchanged lines hidden (view full) ---

30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
37 *
38 * $FreeBSD: head/sys/fs/fdescfs/fdesc_vnops.c 77031 2001-05-23 09:42:29Z ru $
38 * $FreeBSD: head/sys/fs/fdescfs/fdesc_vnops.c 78240 2001-06-15 00:27:21Z peter $
39 */
40
41/*
42 * /dev/fd Filesystem
43 */
44
45#include <sys/param.h>
46#include <sys/systm.h>

--- 20 unchanged lines hidden (view full) ---

67static vop_t **fdesc_vnodeop_p;
68
69#define NFDCACHE 4
70#define FD_NHASH(ix) \
71 (&fdhashtbl[(ix) & fdhash])
72static LIST_HEAD(fdhashhead, fdescnode) *fdhashtbl;
73static u_long fdhash;
74
39 */
40
41/*
42 * /dev/fd Filesystem
43 */
44
45#include <sys/param.h>
46#include <sys/systm.h>

--- 20 unchanged lines hidden (view full) ---

67static vop_t **fdesc_vnodeop_p;
68
69#define NFDCACHE 4
70#define FD_NHASH(ix) \
71 (&fdhashtbl[(ix) & fdhash])
72static LIST_HEAD(fdhashhead, fdescnode) *fdhashtbl;
73static u_long fdhash;
74
75static int fdesc_badop __P((void));
76static int fdesc_getattr __P((struct vop_getattr_args *ap));
77static int fdesc_inactive __P((struct vop_inactive_args *ap));
78static int fdesc_lookup __P((struct vop_lookup_args *ap));
79static int fdesc_open __P((struct vop_open_args *ap));
80static int fdesc_print __P((struct vop_print_args *ap));
81static int fdesc_readdir __P((struct vop_readdir_args *ap));
82static int fdesc_reclaim __P((struct vop_reclaim_args *ap));
83static int fdesc_poll __P((struct vop_poll_args *ap));

--- 455 unchanged lines hidden (view full) ---

539 struct vnode *a_vp;
540 } */ *ap;
541{
542
543 printf("tag VT_NON, fdesc vnode\n");
544 return (0);
545}
546
75static int fdesc_getattr __P((struct vop_getattr_args *ap));
76static int fdesc_inactive __P((struct vop_inactive_args *ap));
77static int fdesc_lookup __P((struct vop_lookup_args *ap));
78static int fdesc_open __P((struct vop_open_args *ap));
79static int fdesc_print __P((struct vop_print_args *ap));
80static int fdesc_readdir __P((struct vop_readdir_args *ap));
81static int fdesc_reclaim __P((struct vop_reclaim_args *ap));
82static int fdesc_poll __P((struct vop_poll_args *ap));

--- 455 unchanged lines hidden (view full) ---

538 struct vnode *a_vp;
539 } */ *ap;
540{
541
542 printf("tag VT_NON, fdesc vnode\n");
543 return (0);
544}
545
547/*
548 * /dev/fd "should never get here" operation
549 */
550static int
551fdesc_badop()
552{
553
554 panic("fdesc: bad op");
555 /* NOTREACHED */
556}
557
558static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = {
559 { &vop_default_desc, (vop_t *) vop_defaultop },
560 { &vop_access_desc, (vop_t *) vop_null },
561 { &vop_getattr_desc, (vop_t *) fdesc_getattr },
562 { &vop_inactive_desc, (vop_t *) fdesc_inactive },
563 { &vop_lookup_desc, (vop_t *) fdesc_lookup },
564 { &vop_open_desc, (vop_t *) fdesc_open },
565 { &vop_pathconf_desc, (vop_t *) vop_stdpathconf },
566 { &vop_poll_desc, (vop_t *) fdesc_poll },
567 { &vop_print_desc, (vop_t *) fdesc_print },
568 { &vop_readdir_desc, (vop_t *) fdesc_readdir },
569 { &vop_reclaim_desc, (vop_t *) fdesc_reclaim },
570 { &vop_setattr_desc, (vop_t *) fdesc_setattr },
571 { NULL, NULL }
572};
573static struct vnodeopv_desc fdesc_vnodeop_opv_desc =
574 { &fdesc_vnodeop_p, fdesc_vnodeop_entries };
575
576VNODEOP_SET(fdesc_vnodeop_opv_desc);
546static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = {
547 { &vop_default_desc, (vop_t *) vop_defaultop },
548 { &vop_access_desc, (vop_t *) vop_null },
549 { &vop_getattr_desc, (vop_t *) fdesc_getattr },
550 { &vop_inactive_desc, (vop_t *) fdesc_inactive },
551 { &vop_lookup_desc, (vop_t *) fdesc_lookup },
552 { &vop_open_desc, (vop_t *) fdesc_open },
553 { &vop_pathconf_desc, (vop_t *) vop_stdpathconf },
554 { &vop_poll_desc, (vop_t *) fdesc_poll },
555 { &vop_print_desc, (vop_t *) fdesc_print },
556 { &vop_readdir_desc, (vop_t *) fdesc_readdir },
557 { &vop_reclaim_desc, (vop_t *) fdesc_reclaim },
558 { &vop_setattr_desc, (vop_t *) fdesc_setattr },
559 { NULL, NULL }
560};
561static struct vnodeopv_desc fdesc_vnodeop_opv_desc =
562 { &fdesc_vnodeop_p, fdesc_vnodeop_entries };
563
564VNODEOP_SET(fdesc_vnodeop_opv_desc);