pass V_SAVE to vinvalbuf
[unix-history] / usr / src / sys / miscfs / fdesc / fdesc.h
CommitLineData
e2e9adba 1/*
99315dca
KB
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
e2e9adba
JSP
4 *
5 * This code is derived from software donated to Berkeley by
6 * Jan-Simon Pendry.
7 *
8 * %sccs.include.redist.c%
9 *
1611db1e 10 * @(#)fdesc.h 8.5 (Berkeley) %G%
e2e9adba 11 *
01936f59 12 * $Id: fdesc.h,v 1.8 1993/04/06 15:28:33 jsp Exp $
e2e9adba
JSP
13 */
14
15#ifdef KERNEL
16struct fdescmount {
17 struct vnode *f_root; /* Root node */
18};
19
01936f59
JSP
20#define FD_ROOT 2
21#define FD_DEVFD 3
22#define FD_STDIN 4
23#define FD_STDOUT 5
24#define FD_STDERR 6
25#define FD_CTTY 7
26#define FD_DESC 8
27#define FD_MAX 12
28
29typedef enum {
30 Froot,
31 Fdevfd,
32 Fdesc,
33 Flink,
34 Fctty
35} fdntype;
36
e2e9adba 37struct fdescnode {
43ec9518
JSP
38 struct fdescnode *fd_forw; /* Hash chain */
39 struct fdescnode *fd_back;
40 struct vnode *fd_vnode; /* Back ptr to vnode */
01936f59
JSP
41 fdntype fd_type; /* Type of this node */
42 unsigned fd_fd; /* Fd to be dup'ed */
43 char *fd_link; /* Link to fd/n */
44 int fd_ix; /* filesystem index */
e2e9adba
JSP
45};
46
47#define VFSTOFDESC(mp) ((struct fdescmount *)((mp)->mnt_data))
48#define VTOFDESC(vp) ((struct fdescnode *)(vp)->v_data)
49
01936f59 50extern dev_t devctty;
43ec9518
JSP
51extern int fdesc_init __P((void));
52extern int fdesc_root __P((struct mount *, struct vnode **));
01936f59 53extern int fdesc_allocvp __P((fdntype, int, struct mount *, struct vnode **));
e2e9adba
JSP
54extern int (**fdesc_vnodeop_p)();
55extern struct vfsops fdesc_vfsops;
56#endif /* KERNEL */