Deleted Added
full compact
devfs.h (157685) devfs.h (162398)
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 2000
5 * Poul-Henning Kamp. All rights reserved.
6 * Copyright (c) 2002
7 * Dima Dorfman. All rights reserved.
8 *

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

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 * @(#)kernfs.h 8.6 (Berkeley) 3/29/95
34 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs.h 1.14
35 *
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 2000
5 * Poul-Henning Kamp. All rights reserved.
6 * Copyright (c) 2002
7 * Dima Dorfman. All rights reserved.
8 *

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

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 * @(#)kernfs.h 8.6 (Berkeley) 3/29/95
34 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs.h 1.14
35 *
36 * $FreeBSD: head/sys/fs/devfs/devfs.h 157685 2006-04-12 12:17:29Z pjd $
36 * $FreeBSD: head/sys/fs/devfs/devfs.h 162398 2006-09-18 13:23:08Z kib $
37 */
38
39#ifndef _FS_DEVFS_DEVFS_H_
40#define _FS_DEVFS_DEVFS_H_
41
42#define DEVFS_MAGIC 0xdb0a087a
43
44/*

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

124
125struct devfs_dirent {
126 struct cdev_priv *de_cdp;
127 int de_inode;
128 int de_flags;
129#define DE_WHITEOUT 0x1
130#define DE_DOT 0x2
131#define DE_DOTDOT 0x4
37 */
38
39#ifndef _FS_DEVFS_DEVFS_H_
40#define _FS_DEVFS_DEVFS_H_
41
42#define DEVFS_MAGIC 0xdb0a087a
43
44/*

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

124
125struct devfs_dirent {
126 struct cdev_priv *de_cdp;
127 int de_inode;
128 int de_flags;
129#define DE_WHITEOUT 0x1
130#define DE_DOT 0x2
131#define DE_DOTDOT 0x4
132#define DE_DOOMED 0x8
133 int de_holdcnt;
132 struct dirent *de_dirent;
133 TAILQ_ENTRY(devfs_dirent) de_list;
134 TAILQ_HEAD(, devfs_dirent) de_dlist;
135 struct devfs_dirent *de_dir;
136 int de_links;
137 mode_t de_mode;
138 uid_t de_uid;
139 gid_t de_gid;

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

145 char *de_symlink;
146};
147
148struct devfs_mount {
149 u_int dm_idx;
150 struct mount *dm_mount;
151 struct devfs_dirent *dm_rootdir;
152 unsigned dm_generation;
134 struct dirent *de_dirent;
135 TAILQ_ENTRY(devfs_dirent) de_list;
136 TAILQ_HEAD(, devfs_dirent) de_dlist;
137 struct devfs_dirent *de_dir;
138 int de_links;
139 mode_t de_mode;
140 uid_t de_uid;
141 gid_t de_gid;

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

147 char *de_symlink;
148};
149
150struct devfs_mount {
151 u_int dm_idx;
152 struct mount *dm_mount;
153 struct devfs_dirent *dm_rootdir;
154 unsigned dm_generation;
155 int dm_holdcnt;
153 struct sx dm_lock;
154 devfs_rsnum dm_ruleset;
155};
156
157#define DEVFS_ROOTINO 2
158
159extern unsigned devfs_rule_depth;
160
161#define VFSTODEVFS(mp) ((struct devfs_mount *)((mp)->mnt_data))
162
156 struct sx dm_lock;
157 devfs_rsnum dm_ruleset;
158};
159
160#define DEVFS_ROOTINO 2
161
162extern unsigned devfs_rule_depth;
163
164#define VFSTODEVFS(mp) ((struct devfs_mount *)((mp)->mnt_data))
165
166#define DEVFS_DE_HOLD(de) ((de)->de_holdcnt++)
167#define DEVFS_DE_DROP(de) (--(de)->de_holdcnt == 0)
168
169#define DEVFS_DMP_HOLD(dmp) ((dmp)->dm_holdcnt++)
170#define DEVFS_DMP_DROP(dmp) (--(dmp)->dm_holdcnt == 0)
171
163void devfs_rules_apply(struct devfs_mount *dm, struct devfs_dirent *de);
164void devfs_rules_cleanup (struct devfs_mount *dm);
165int devfs_rules_ioctl(struct devfs_mount *dm, u_long cmd, caddr_t data, struct thread *td);
166int devfs_allocv (struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, struct thread *td);
167void devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de);
172void devfs_rules_apply(struct devfs_mount *dm, struct devfs_dirent *de);
173void devfs_rules_cleanup (struct devfs_mount *dm);
174int devfs_rules_ioctl(struct devfs_mount *dm, u_long cmd, caddr_t data, struct thread *td);
175int devfs_allocv (struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, struct thread *td);
176void devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de);
177void devfs_dirent_free(struct devfs_dirent *de);
168void devfs_populate (struct devfs_mount *dm);
169void devfs_cleanup (struct devfs_mount *dm);
178void devfs_populate (struct devfs_mount *dm);
179void devfs_cleanup (struct devfs_mount *dm);
180void devfs_unmount_final(struct devfs_mount *mp);
170struct devfs_dirent *devfs_newdirent (char *name, int namelen);
171struct devfs_dirent *devfs_vmkdir (struct devfs_mount *, char *name, int namelen, struct devfs_dirent *dotdot, u_int inode);
172struct devfs_dirent *devfs_find (struct devfs_dirent *dd, const char *name, int namelen);
173
174#endif /* _KERNEL */
175
176#endif /* !_FS_DEVFS_DEVFS_H_ */
181struct devfs_dirent *devfs_newdirent (char *name, int namelen);
182struct devfs_dirent *devfs_vmkdir (struct devfs_mount *, char *name, int namelen, struct devfs_dirent *dotdot, u_int inode);
183struct devfs_dirent *devfs_find (struct devfs_dirent *dd, const char *name, int namelen);
184
185#endif /* _KERNEL */
186
187#endif /* !_FS_DEVFS_DEVFS_H_ */