diff options
author | jhb <jhb@FreeBSD.org> | 2001-11-26 23:45:12 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-11-26 23:45:12 +0000 |
commit | 8698e45aa6fbe0c7fd2a90ae8256861b6be2de9b (patch) | |
tree | cc35821e407f5e488c3289ca14822d7fae38d031 /sys/fs/hpfs/hpfs_vnops.c | |
parent | d7f0a44ce0783613819e92329504ab0cb10e543c (diff) | |
download | FreeBSD-src-8698e45aa6fbe0c7fd2a90ae8256861b6be2de9b.zip FreeBSD-src-8698e45aa6fbe0c7fd2a90ae8256861b6be2de9b.tar.gz |
GC non-FreeBSD code that didn't work anyways.
Diffstat (limited to 'sys/fs/hpfs/hpfs_vnops.c')
-rw-r--r-- | sys/fs/hpfs/hpfs_vnops.c | 112 |
1 files changed, 1 insertions, 111 deletions
diff --git a/sys/fs/hpfs/hpfs_vnops.c b/sys/fs/hpfs/hpfs_vnops.c index 09c83d6..340db6e 100644 --- a/sys/fs/hpfs/hpfs_vnops.c +++ b/sys/fs/hpfs/hpfs_vnops.c @@ -43,23 +43,13 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#if !defined(__FreeBSD__) -#include <vm/vm_prot.h> -#endif #include <vm/vm_page.h> #include <vm/vm_object.h> #include <vm/vm_pager.h> #include <vm/vm_zone.h> -#if defined(__FreeBSD__) #include <vm/vnode_pager.h> -#endif #include <vm/vm_extern.h> -#if !defined(__FreeBSD__) -#include <miscfs/specfs/specdev.h> -#include <miscfs/genfs/genfs.h> -#endif - #include <sys/unistd.h> /* for pathconf(2) constants */ #include <fs/hpfs/hpfs.h> @@ -67,11 +57,10 @@ #include <fs/hpfs/hpfs_subr.h> #include <fs/hpfs/hpfs_ioctl.h> -#if defined(__FreeBSD__) +/* XXXKSE */ #define a_p a_td #define cn_proc cn_thread #define proc thread -#endif static int hpfs_de_uiomove __P((struct hpfsmount *, struct hpfsdirent *, struct uio *)); @@ -93,15 +82,9 @@ static int hpfs_lookup __P((struct vop_lookup_args *ap)); static int hpfs_create __P((struct vop_create_args *)); static int hpfs_remove __P((struct vop_remove_args *)); static int hpfs_bmap __P((struct vop_bmap_args *ap)); -#if defined(__FreeBSD__) static int hpfs_fsync __P((struct vop_fsync_args *ap)); -#else -static int hpfs_abortop __P((struct vop_abortop_args *)); -#endif static int hpfs_pathconf __P((struct vop_pathconf_args *ap)); -#if defined(__FreeBSD__) - static int hpfs_fsync(ap) struct vop_fsync_args /* { @@ -149,8 +132,6 @@ loop: return hpfs_update(VTOHP(vp)); } -#endif - static int hpfs_ioctl ( struct vop_ioctl_args /* { @@ -304,10 +285,8 @@ hpfs_bmap(ap) if (ap->a_vpp != NULL) *ap->a_vpp = hp->h_devvp; -#if defined(__FreeBSD__) if (ap->a_runb != NULL) *ap->a_runb = 0; -#endif if (ap->a_bnp == NULL) return (0); @@ -481,11 +460,7 @@ hpfs_getattr(ap) dprintf(("hpfs_getattr(0x%x):\n", hp->h_no)); -#if defined(__FreeBSD__) vap->va_fsid = dev2udev(hp->h_dev); -#else /* defined(__NetBSD__) */ - vap->va_fsid = ip->i_dev; -#endif vap->va_fileid = hp->h_no; vap->va_mode = hp->h_mode; vap->va_nlink = 1; @@ -569,11 +544,7 @@ hpfs_setattr(ap) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); if (cred->cr_uid != hp->h_uid && -#if defined(__FreeBSD__) (error = suser_xxx(cred, p->td_proc, PRISON_ROOT)) && -#else - (error = suser_xxx(cred, p, PRISON_ROOT)) && -#endif ((vap->va_vaflags & VA_UTIMES_NULL) == 0 || (error = VOP_ACCESS(vp, VWRITE, cred, p)))) return (error); @@ -599,21 +570,15 @@ hpfs_setattr(ap) } if (vap->va_size < hp->h_fn.fn_size) { -#if defined(__FreeBSD__) error = vtruncbuf(vp, cred, p, vap->va_size, DEV_BSIZE); if (error) return (error); -#else /* defined(__NetBSD__) */ -#error Need alternation for vtruncbuf() -#endif error = hpfs_truncate(hp, vap->va_size); if (error) return (error); } else if (vap->va_size > hp->h_fn.fn_size) { -#if defined(__FreeBSD__) vnode_pager_setsize(vp, vap->va_size); -#endif error = hpfs_extend(hp, vap->va_size); if (error) return (error); @@ -657,11 +622,7 @@ hpfs_inactive(ap) if (hp->h_flag & H_INVAL) { VOP__UNLOCK(vp,0,ap->a_p); -#if defined(__FreeBSD__) vrecycle(vp, NULL, ap->a_td); -#else /* defined(__NetBSD__) */ - vgone(vp); -#endif return (0); } @@ -1078,13 +1039,8 @@ readdone: if (!error && ap->a_ncookies != NULL) { struct dirent* dpStart; struct dirent* dp; -#if defined(__FreeBSD__) u_long *cookies; u_long *cookiep; -#else /* defined(__NetBSD__) */ - off_t *cookies; - off_t *cookiep; -#endif dprintf(("%d cookies, ",ncookies)); if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iovcnt != 1) @@ -1092,13 +1048,8 @@ readdone: dpStart = (struct dirent *) ((caddr_t)uio->uio_iov->iov_base - (uio->uio_offset - off)); -#if defined(__FreeBSD__) MALLOC(cookies, u_long *, ncookies * sizeof(u_long), M_TEMP, M_WAITOK); -#else /* defined(__NetBSD__) */ - MALLOC(cookies, off_t *, ncookies * sizeof(off_t), - M_TEMP, M_WAITOK); -#endif for (dp = dpStart, cookiep = cookies, i=0; i < ncookies; dp = (struct dirent *)((caddr_t) dp + dp->d_reclen), i++) { @@ -1308,14 +1259,6 @@ hpfs_pathconf(ap) case _PC_NO_TRUNC: *ap->a_retval = 0; return (0); -#if defined(__NetBSD__) - case _PC_SYNC_IO: - *ap->a_retval = 1; - return (0); - case _PC_FILESIZEBITS: - *ap->a_retval = 32; - return (0); -#endif default: return (EINVAL); } @@ -1327,7 +1270,6 @@ hpfs_pathconf(ap) * Global vfs data structures */ vop_t **hpfs_vnodeop_p; -#if defined(__FreeBSD__) struct vnodeopv_entry_desc hpfs_vnodeop_entries[] = { { &vop_default_desc, (vop_t *)hpfs_bypass }, @@ -1364,55 +1306,3 @@ struct vnodeopv_desc hpfs_vnodeop_opv_desc = { &hpfs_vnodeop_p, hpfs_vnodeop_entries }; VNODEOP_SET(hpfs_vnodeop_opv_desc); -#else /* defined(__NetBSD__) */ -struct vnodeopv_entry_desc ntfs_vnodeop_entries[] = { - { &vop_default_desc, (vop_t *) hpfs_bypass }, - { &vop_lookup_desc, (vop_t *) hpfs_lookup }, /* lookup */ - { &vop_create_desc, genfs_eopnotsupp }, /* create */ - { &vop_mknod_desc, genfs_eopnotsupp }, /* mknod */ - { &vop_open_desc, (vop_t *) hpfs_open }, /* open */ - { &vop_close_desc,(vop_t *) hpfs_close }, /* close */ - { &vop_access_desc, (vop_t *) hpfs_access }, /* access */ - { &vop_getattr_desc, (vop_t *) hpfs_getattr }, /* getattr */ - { &vop_setattr_desc, genfs_eopnotsupp }, /* setattr */ - { &vop_read_desc, (vop_t *) hpfs_read }, /* read */ - { &vop_write_desc, (vop_t *) hpfs_write }, /* write */ - { &vop_lease_desc, genfs_lease_check }, /* lease */ - { &vop_fcntl_desc, genfs_fcntl }, /* fcntl */ - { &vop_ioctl_desc, genfs_enoioctl }, /* ioctl */ - { &vop_poll_desc, genfs_poll }, /* poll */ - { &vop_revoke_desc, genfs_revoke }, /* revoke */ - { &vop_fsync_desc, genfs_fsync }, /* fsync */ - { &vop_seek_desc, genfs_seek }, /* seek */ - { &vop_remove_desc, genfs_eopnotsupp }, /* remove */ - { &vop_link_desc, genfs_eopnotsupp }, /* link */ - { &vop_rename_desc, genfs_eopnotsupp }, /* rename */ - { &vop_mkdir_desc, genfs_eopnotsupp }, /* mkdir */ - { &vop_rmdir_desc, genfs_eopnotsupp }, /* rmdir */ - { &vop_symlink_desc, genfs_eopnotsupp }, /* symlink */ - { &vop_readdir_desc, (vop_t *) hpfs_readdir }, /* readdir */ - { &vop_readlink_desc, genfs_eopnotsupp }, /* readlink */ - { &vop_abortop_desc, genfs_abortop }, /* abortop */ - { &vop_inactive_desc, (vop_t *) hpfs_inactive }, /* inactive */ - { &vop_reclaim_desc, (vop_t *) hpfs_reclaim }, /* reclaim */ - { &vop_lock_desc, genfs_lock }, /* lock */ - { &vop_unlock_desc, genfs_unlock }, /* unlock */ - { &vop_bmap_desc, (vop_t *) hpfs_bmap }, /* bmap */ - { &vop_strategy_desc, (vop_t *) hpfs_strategy }, /* strategy */ - { &vop_print_desc, (vop_t *) hpfs_print }, /* print */ - { &vop_islocked_desc, genfs_islocked }, /* islocked */ - { &vop_pathconf_desc, hpfs_pathconf }, /* pathconf */ - { &vop_advlock_desc, genfs_nullop }, /* advlock */ - { &vop_blkatoff_desc, genfs_eopnotsupp }, /* blkatoff */ - { &vop_valloc_desc, genfs_eopnotsupp }, /* valloc */ - { &vop_reallocblks_desc, genfs_eopnotsupp }, /* reallocblks */ - { &vop_vfree_desc, genfs_eopnotsupp }, /* vfree */ - { &vop_truncate_desc, genfs_eopnotsupp }, /* truncate */ - { &vop_update_desc, genfs_eopnotsupp }, /* update */ - { &vop_bwrite_desc, vn_bwrite }, /* bwrite */ - { (struct vnodeop_desc *)NULL, (int (*) __P((void *)))NULL } -}; -struct vnodeopv_desc ntfs_vnodeop_opv_desc = - { &ntfs_vnodeop_p, ntfs_vnodeop_entries }; - -#endif |