Deleted Added
full compact
devfs_vnops.c (97702) devfs_vnops.c (100206)
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 *
7 * This code is derived from software donated to Berkeley by
8 * Jan-Simon Pendry.

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

26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * @(#)kernfs_vnops.c 8.15 (Berkeley) 5/21/95
32 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vnops.c 1.43
33 *
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 *
7 * This code is derived from software donated to Berkeley by
8 * Jan-Simon Pendry.

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

26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * @(#)kernfs_vnops.c 8.15 (Berkeley) 5/21/95
32 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vnops.c 1.43
33 *
34 * $FreeBSD: head/sys/fs/devfs/devfs_vnops.c 97702 2002-06-01 09:17:43Z semenu $
34 * $FreeBSD: head/sys/fs/devfs/devfs_vnops.c 100206 2002-07-17 01:46:48Z dd $
35 */
36
37/*
38 * TODO:
39 * remove empty directories
40 * mknod: hunt down DE_DELETED, compare name, reinstantiate.
41 * mkdir: want it ?
42 */

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

57#include <sys/time.h>
58#include <sys/unistd.h>
59#include <sys/vnode.h>
60
61#include <fs/devfs/devfs.h>
62
63static int devfs_access(struct vop_access_args *ap);
64static int devfs_getattr(struct vop_getattr_args *ap);
35 */
36
37/*
38 * TODO:
39 * remove empty directories
40 * mknod: hunt down DE_DELETED, compare name, reinstantiate.
41 * mkdir: want it ?
42 */

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

57#include <sys/time.h>
58#include <sys/unistd.h>
59#include <sys/vnode.h>
60
61#include <fs/devfs/devfs.h>
62
63static int devfs_access(struct vop_access_args *ap);
64static int devfs_getattr(struct vop_getattr_args *ap);
65static int devfs_ioctl(struct vop_ioctl_args *ap);
65static int devfs_lookupx(struct vop_lookup_args *ap);
66static int devfs_mknod(struct vop_mknod_args *ap);
67static int devfs_pathconf(struct vop_pathconf_args *ap);
68static int devfs_print(struct vop_print_args *ap);
69static int devfs_read(struct vop_read_args *ap);
70static int devfs_readdir(struct vop_readdir_args *ap);
71static int devfs_readlink(struct vop_readlink_args *ap);
72static int devfs_reclaim(struct vop_reclaim_args *ap);

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

242 vap->va_flags = 0;
243 vap->va_nlink = de->de_links;
244 vap->va_fileid = de->de_inode;
245
246 return (error);
247}
248
249static int
66static int devfs_lookupx(struct vop_lookup_args *ap);
67static int devfs_mknod(struct vop_mknod_args *ap);
68static int devfs_pathconf(struct vop_pathconf_args *ap);
69static int devfs_print(struct vop_print_args *ap);
70static int devfs_read(struct vop_read_args *ap);
71static int devfs_readdir(struct vop_readdir_args *ap);
72static int devfs_readlink(struct vop_readlink_args *ap);
73static int devfs_reclaim(struct vop_reclaim_args *ap);

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

243 vap->va_flags = 0;
244 vap->va_nlink = de->de_links;
245 vap->va_fileid = de->de_inode;
246
247 return (error);
248}
249
250static int
251devfs_ioctl(ap)
252 struct vop_ioctl_args /* {
253 struct vnode *a_vp;
254 int a_command;
255 caddr_t a_data;
256 int a_fflag;
257 struct ucred *a_cred;
258 struct thread *a_td;
259 } */ *ap;
260{
261 int error;
262
263 error = devfs_rules_ioctl(ap->a_vp->v_mount, ap->a_command, ap->a_data,
264 ap->a_td);
265 return (error);
266}
267
268static int
250devfs_lookupx(ap)
251 struct vop_lookup_args /* {
252 struct vnode * a_dvp;
253 struct vnode ** a_vpp;
254 struct componentname * a_cnp;
255 } */ *ap;
256{
257 struct componentname *cnp;

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

803 return (0);
804}
805
806static vop_t **devfs_vnodeop_p;
807static struct vnodeopv_entry_desc devfs_vnodeop_entries[] = {
808 { &vop_default_desc, (vop_t *) vop_defaultop },
809 { &vop_access_desc, (vop_t *) devfs_access },
810 { &vop_getattr_desc, (vop_t *) devfs_getattr },
269devfs_lookupx(ap)
270 struct vop_lookup_args /* {
271 struct vnode * a_dvp;
272 struct vnode ** a_vpp;
273 struct componentname * a_cnp;
274 } */ *ap;
275{
276 struct componentname *cnp;

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

822 return (0);
823}
824
825static vop_t **devfs_vnodeop_p;
826static struct vnodeopv_entry_desc devfs_vnodeop_entries[] = {
827 { &vop_default_desc, (vop_t *) vop_defaultop },
828 { &vop_access_desc, (vop_t *) devfs_access },
829 { &vop_getattr_desc, (vop_t *) devfs_getattr },
830 { &vop_ioctl_desc, (vop_t *) devfs_ioctl },
811 { &vop_islocked_desc, (vop_t *) vop_stdislocked },
812 { &vop_lock_desc, (vop_t *) vop_stdlock },
813 { &vop_lookup_desc, (vop_t *) devfs_lookup },
814 { &vop_mknod_desc, (vop_t *) devfs_mknod },
815 { &vop_pathconf_desc, (vop_t *) devfs_pathconf },
816 { &vop_print_desc, (vop_t *) devfs_print },
817 { &vop_read_desc, (vop_t *) devfs_read },
818 { &vop_readdir_desc, (vop_t *) devfs_readdir },

--- 34 unchanged lines hidden ---
831 { &vop_islocked_desc, (vop_t *) vop_stdislocked },
832 { &vop_lock_desc, (vop_t *) vop_stdlock },
833 { &vop_lookup_desc, (vop_t *) devfs_lookup },
834 { &vop_mknod_desc, (vop_t *) devfs_mknod },
835 { &vop_pathconf_desc, (vop_t *) devfs_pathconf },
836 { &vop_print_desc, (vop_t *) devfs_print },
837 { &vop_read_desc, (vop_t *) devfs_read },
838 { &vop_readdir_desc, (vop_t *) devfs_readdir },

--- 34 unchanged lines hidden ---