pseudofs.h (95953) | pseudofs.h (97940) |
---|---|
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 95953 2002-05-02 20:25:55Z mux $ | 28 * $FreeBSD: head/sys/fs/pseudofs/pseudofs.h 97940 2002-06-06 16:59:24Z des $ |
29 */ 30 31#ifndef _PSEUDOFS_H_INCLUDED 32#define _PSEUDOFS_H_INCLUDED 33 34/* 35 * Opaque structures 36 */ --- 145 unchanged lines hidden (view full) --- 182#define pn_nodes u1._pn_nodes 183 pfs_ioctl_t pn_ioctl; 184 pfs_close_t pn_close; 185 pfs_attr_t pn_attr; 186 pfs_vis_t pn_vis; 187 pfs_getextattr_t pn_getextattr; 188 void *pn_data; 189 int pn_flags; | 29 */ 30 31#ifndef _PSEUDOFS_H_INCLUDED 32#define _PSEUDOFS_H_INCLUDED 33 34/* 35 * Opaque structures 36 */ --- 145 unchanged lines hidden (view full) --- 182#define pn_nodes u1._pn_nodes 183 pfs_ioctl_t pn_ioctl; 184 pfs_close_t pn_close; 185 pfs_attr_t pn_attr; 186 pfs_vis_t pn_vis; 187 pfs_getextattr_t pn_getextattr; 188 void *pn_data; 189 int pn_flags; |
190 | 190 |
191 struct pfs_info *pn_info; 192 struct pfs_node *pn_parent; 193 struct pfs_node *pn_next; 194 u_int32_t pn_fileno; 195}; 196 197/* 198 * VFS interface 199 */ | 191 struct pfs_info *pn_info; 192 struct pfs_node *pn_parent; 193 struct pfs_node *pn_next; 194 u_int32_t pn_fileno; 195}; 196 197/* 198 * VFS interface 199 */ |
200int pfs_mount (struct pfs_info *pi, struct mount *mp, | 200int pfs_mount (struct pfs_info *pi, struct mount *mp, |
201 struct nameidata *ndp, struct thread *td); | 201 struct nameidata *ndp, struct thread *td); |
202int pfs_unmount (struct mount *mp, int mntflags, | 202int pfs_unmount (struct mount *mp, int mntflags, |
203 struct thread *td); 204int pfs_root (struct mount *mp, struct vnode **vpp); | 203 struct thread *td); 204int pfs_root (struct mount *mp, struct vnode **vpp); |
205int pfs_statfs (struct mount *mp, struct statfs *sbp, | 205int pfs_statfs (struct mount *mp, struct statfs *sbp, |
206 struct thread *td); | 206 struct thread *td); |
207int pfs_init (struct pfs_info *pi, struct vfsconf *vfc); 208int pfs_uninit (struct pfs_info *pi, struct vfsconf *vfc); | 207int pfs_init (struct pfs_info *pi, struct vfsconf *vfc); 208int pfs_uninit (struct pfs_info *pi, struct vfsconf *vfc); |
209 210/* 211 * Directory structure construction and manipulation 212 */ 213struct pfs_node *pfs_create_dir (struct pfs_node *parent, char *name, 214 pfs_attr_t attr, pfs_vis_t vis, int flags); 215struct pfs_node *pfs_create_file(struct pfs_node *parent, char *name, 216 pfs_fill_t fill, pfs_attr_t attr, --- 14 unchanged lines hidden (view full) --- 231 #name, \ 232 &name##_init, \ 233 &name##_uninit, \ 234}; \ 235 \ 236static int \ 237_##name##_mount(struct mount *mp, struct nameidata *ndp, \ 238 struct thread *td) { \ | 209 210/* 211 * Directory structure construction and manipulation 212 */ 213struct pfs_node *pfs_create_dir (struct pfs_node *parent, char *name, 214 pfs_attr_t attr, pfs_vis_t vis, int flags); 215struct pfs_node *pfs_create_file(struct pfs_node *parent, char *name, 216 pfs_fill_t fill, pfs_attr_t attr, --- 14 unchanged lines hidden (view full) --- 231 #name, \ 232 &name##_init, \ 233 &name##_uninit, \ 234}; \ 235 \ 236static int \ 237_##name##_mount(struct mount *mp, struct nameidata *ndp, \ 238 struct thread *td) { \ |
239 return pfs_mount(&name##_info, mp, ndp, td); \ | 239 return pfs_mount(&name##_info, mp, ndp, td); \ |
240} \ 241 \ 242static int \ 243_##name##_init(struct vfsconf *vfc) { \ | 240} \ 241 \ 242static int \ 243_##name##_init(struct vfsconf *vfc) { \ |
244 return pfs_init(&name##_info, vfc); \ | 244 return pfs_init(&name##_info, vfc); \ |
245} \ 246 \ 247static int \ 248_##name##_uninit(struct vfsconf *vfc) { \ | 245} \ 246 \ 247static int \ 248_##name##_uninit(struct vfsconf *vfc) { \ |
249 return pfs_uninit(&name##_info, vfc); \ | 249 return pfs_uninit(&name##_info, vfc); \ |
250} \ 251 \ 252static struct vfsops name##_vfsops = { \ 253 NULL, \ 254 vfs_stdstart, \ 255 pfs_unmount, \ 256 pfs_root, \ 257 vfs_stdquotactl, \ --- 16 unchanged lines hidden --- | 250} \ 251 \ 252static struct vfsops name##_vfsops = { \ 253 NULL, \ 254 vfs_stdstart, \ 255 pfs_unmount, \ 256 pfs_root, \ 257 vfs_stdquotactl, \ --- 16 unchanged lines hidden --- |