pseudofs.h (158611) | pseudofs.h (167482) |
---|---|
1/*- 2 * Copyright (c) 2001 Dag-Erling Co�dan Sm�rgrav 3 * 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 --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 2001 Dag-Erling Co�dan Sm�rgrav 3 * 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 --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/fs/pseudofs/pseudofs.h 158611 2006-05-15 19:42:10Z kbyanc $ | 28 * $FreeBSD: head/sys/fs/pseudofs/pseudofs.h 167482 2007-03-12 12:16:52Z des $ |
29 */ 30 31#ifndef _PSEUDOFS_H_INCLUDED 32#define _PSEUDOFS_H_INCLUDED 33 34/* 35 * Opaque structures 36 */ --- 113 unchanged lines hidden (view full) --- 150 */ 151#define PFS_CLOSE_ARGS \ 152 struct thread *td, struct proc *p, struct pfs_node *pn 153#define PFS_CLOSE_PROTO(name) \ 154 int name(PFS_CLOSE_ARGS); 155typedef int (*pfs_close_t)(PFS_CLOSE_ARGS); 156 157/* | 29 */ 30 31#ifndef _PSEUDOFS_H_INCLUDED 32#define _PSEUDOFS_H_INCLUDED 33 34/* 35 * Opaque structures 36 */ --- 113 unchanged lines hidden (view full) --- 150 */ 151#define PFS_CLOSE_ARGS \ 152 struct thread *td, struct proc *p, struct pfs_node *pn 153#define PFS_CLOSE_PROTO(name) \ 154 int name(PFS_CLOSE_ARGS); 155typedef int (*pfs_close_t)(PFS_CLOSE_ARGS); 156 157/* |
158 * Destroy callback 159 */ 160#define PFS_DESTROY_ARGS \ 161 struct pfs_node *pn 162#define PFS_DESTROY_PROTO(name) \ 163 int name(PFS_DESTROY_ARGS); 164typedef int (*pfs_destroy_t)(PFS_DESTROY_ARGS); 165 166/* |
|
158 * pfs_info: describes a pseudofs instance 159 */ 160struct pfs_info { 161 char pi_name[PFS_FSNAMELEN]; 162 pfs_init_t pi_init; 163 pfs_init_t pi_uninit; 164 /* members below this line aren't initialized */ 165 struct pfs_node *pi_root; --- 15 unchanged lines hidden (view full) --- 181 } u1; 182#define pn_func u1._pn_func 183#define pn_nodes u1._pn_nodes 184 pfs_ioctl_t pn_ioctl; 185 pfs_close_t pn_close; 186 pfs_attr_t pn_attr; 187 pfs_vis_t pn_vis; 188 pfs_getextattr_t pn_getextattr; | 167 * pfs_info: describes a pseudofs instance 168 */ 169struct pfs_info { 170 char pi_name[PFS_FSNAMELEN]; 171 pfs_init_t pi_init; 172 pfs_init_t pi_uninit; 173 /* members below this line aren't initialized */ 174 struct pfs_node *pi_root; --- 15 unchanged lines hidden (view full) --- 190 } u1; 191#define pn_func u1._pn_func 192#define pn_nodes u1._pn_nodes 193 pfs_ioctl_t pn_ioctl; 194 pfs_close_t pn_close; 195 pfs_attr_t pn_attr; 196 pfs_vis_t pn_vis; 197 pfs_getextattr_t pn_getextattr; |
198 pfs_destroy_t pn_destroy; |
|
189 void *pn_data; 190 int pn_flags; 191 192 struct pfs_info *pn_info; 193 struct pfs_node *pn_parent; 194 struct pfs_node *pn_next; 195 u_int32_t pn_fileno; 196}; --- 13 unchanged lines hidden (view full) --- 210 struct thread *td); 211int pfs_init (struct pfs_info *pi, struct vfsconf *vfc); 212int pfs_uninit (struct pfs_info *pi, struct vfsconf *vfc); 213 214/* 215 * Directory structure construction and manipulation 216 */ 217struct pfs_node *pfs_create_dir (struct pfs_node *parent, const char *name, | 199 void *pn_data; 200 int pn_flags; 201 202 struct pfs_info *pn_info; 203 struct pfs_node *pn_parent; 204 struct pfs_node *pn_next; 205 u_int32_t pn_fileno; 206}; --- 13 unchanged lines hidden (view full) --- 220 struct thread *td); 221int pfs_init (struct pfs_info *pi, struct vfsconf *vfc); 222int pfs_uninit (struct pfs_info *pi, struct vfsconf *vfc); 223 224/* 225 * Directory structure construction and manipulation 226 */ 227struct pfs_node *pfs_create_dir (struct pfs_node *parent, const char *name, |
218 pfs_attr_t attr, pfs_vis_t vis, int flags); | 228 pfs_attr_t attr, pfs_vis_t vis, 229 pfs_destroy_t destroy, int flags); |
219struct pfs_node *pfs_create_file(struct pfs_node *parent, const char *name, 220 pfs_fill_t fill, pfs_attr_t attr, | 230struct pfs_node *pfs_create_file(struct pfs_node *parent, const char *name, 231 pfs_fill_t fill, pfs_attr_t attr, |
221 pfs_vis_t vis, int flags); | 232 pfs_vis_t vis, pfs_destroy_t destroy, 233 int flags); |
222struct pfs_node *pfs_create_link(struct pfs_node *parent, const char *name, 223 pfs_fill_t fill, pfs_attr_t attr, | 234struct pfs_node *pfs_create_link(struct pfs_node *parent, const char *name, 235 pfs_fill_t fill, pfs_attr_t attr, |
224 pfs_vis_t vis, int flags); | 236 pfs_vis_t vis, pfs_destroy_t destroy, 237 int flags); |
225struct pfs_node *pfs_find_node (struct pfs_node *parent, const char *name); 226int pfs_disable (struct pfs_node *pn); 227int pfs_enable (struct pfs_node *pn); 228int pfs_destroy (struct pfs_node *pn); 229 230/* 231 * Now for some initialization magic... 232 */ --- 37 unchanged lines hidden --- | 238struct pfs_node *pfs_find_node (struct pfs_node *parent, const char *name); 239int pfs_disable (struct pfs_node *pn); 240int pfs_enable (struct pfs_node *pn); 241int pfs_destroy (struct pfs_node *pn); 242 243/* 244 * Now for some initialization magic... 245 */ --- 37 unchanged lines hidden --- |