cd9660_vnops.c (889fb68f3436471f6522e228852b260ead3fc73b) | cd9660_vnops.c (cb2a8dffa0a79ce0096335ff68f3dabd716626d5) |
---|---|
1/*- 2 * Copyright (c) 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley 6 * by Pace Willisson (pace@blitz.com). The Rock Ridge Extension 7 * Support code is derived from software contributed to Berkeley 8 * by Atsushi Murai (amurai@spec.co.jp). --- 37 unchanged lines hidden (view full) --- 46#include <sys/stat.h> 47#include <sys/buf.h> 48#include <sys/mount.h> 49#include <sys/vnode.h> 50#include <miscfs/fifofs/fifo.h> 51#include <sys/malloc.h> 52#include <sys/dirent.h> 53#include <sys/unistd.h> | 1/*- 2 * Copyright (c) 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley 6 * by Pace Willisson (pace@blitz.com). The Rock Ridge Extension 7 * Support code is derived from software contributed to Berkeley 8 * by Atsushi Murai (amurai@spec.co.jp). --- 37 unchanged lines hidden (view full) --- 46#include <sys/stat.h> 47#include <sys/buf.h> 48#include <sys/mount.h> 49#include <sys/vnode.h> 50#include <miscfs/fifofs/fifo.h> 51#include <sys/malloc.h> 52#include <sys/dirent.h> 53#include <sys/unistd.h> |
54#include <sys/filio.h> |
|
54 55#include <vm/vm.h> 56#include <vm/vm_zone.h> 57#include <vm/vnode_pager.h> 58 59#include <isofs/cd9660/iso.h> 60#include <isofs/cd9660/cd9660_node.h> 61#include <isofs/cd9660/iso_rrip.h> 62 63static int cd9660_setattr __P((struct vop_setattr_args *)); 64static int cd9660_access __P((struct vop_access_args *)); 65static int cd9660_getattr __P((struct vop_getattr_args *)); | 55 56#include <vm/vm.h> 57#include <vm/vm_zone.h> 58#include <vm/vnode_pager.h> 59 60#include <isofs/cd9660/iso.h> 61#include <isofs/cd9660/cd9660_node.h> 62#include <isofs/cd9660/iso_rrip.h> 63 64static int cd9660_setattr __P((struct vop_setattr_args *)); 65static int cd9660_access __P((struct vop_access_args *)); 66static int cd9660_getattr __P((struct vop_getattr_args *)); |
67static int cd9660_ioctl __P((struct vop_ioctl_args *)); |
|
66static int cd9660_pathconf __P((struct vop_pathconf_args *)); 67static int cd9660_read __P((struct vop_read_args *)); 68struct isoreaddir; 69static int iso_uiodir __P((struct isoreaddir *idp, struct dirent *dp, 70 off_t off)); 71static int iso_shipdir __P((struct isoreaddir *idp)); 72static int cd9660_readdir __P((struct vop_readdir_args *)); 73static int cd9660_readlink __P((struct vop_readlink_args *ap)); --- 176 unchanged lines hidden (view full) --- 250 vap->va_blocksize = ip->i_mnt->logical_block_size; 251 vap->va_bytes = (u_quad_t) ip->i_size; 252 vap->va_type = vp->v_type; 253 vap->va_filerev = 0; 254 return (0); 255} 256 257/* | 68static int cd9660_pathconf __P((struct vop_pathconf_args *)); 69static int cd9660_read __P((struct vop_read_args *)); 70struct isoreaddir; 71static int iso_uiodir __P((struct isoreaddir *idp, struct dirent *dp, 72 off_t off)); 73static int iso_shipdir __P((struct isoreaddir *idp)); 74static int cd9660_readdir __P((struct vop_readdir_args *)); 75static int cd9660_readlink __P((struct vop_readlink_args *ap)); --- 176 unchanged lines hidden (view full) --- 252 vap->va_blocksize = ip->i_mnt->logical_block_size; 253 vap->va_bytes = (u_quad_t) ip->i_size; 254 vap->va_type = vp->v_type; 255 vap->va_filerev = 0; 256 return (0); 257} 258 259/* |
260 * Vnode op for ioctl. 261 */ 262static int 263cd9660_ioctl(ap) 264 struct vop_ioctl_args /* { 265 struct vnode *a_vp; 266 int a_command; 267 caddr_t a_data; 268 int a_fflag; 269 struct ucred *a_cred; 270 struct proc *a_p; 271 } */ *ap; 272{ 273 struct vnode *vp = ap->a_vp; 274 struct iso_node *ip = VTOI(vp); 275 276 switch (ap->a_command) { 277 278 case FIOGETLBA: 279 *(int *)(ap->a_data) = ip->iso_start; 280 return 0; 281 default: 282 return (ENOTTY); 283 } 284} 285 286/* |
|
258 * Vnode op for reading. 259 */ 260static int 261cd9660_read(ap) 262 struct vop_read_args /* { 263 struct vnode *a_vp; 264 struct uio *a_uio; 265 int a_ioflag; --- 586 unchanged lines hidden (view full) --- 852static struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = { 853 { &vop_default_desc, (vop_t *) vop_defaultop }, 854 { &vop_abortop_desc, (vop_t *) cd9660_abortop }, 855 { &vop_access_desc, (vop_t *) cd9660_access }, 856 { &vop_bmap_desc, (vop_t *) cd9660_bmap }, 857 { &vop_cachedlookup_desc, (vop_t *) cd9660_lookup }, 858 { &vop_getattr_desc, (vop_t *) cd9660_getattr }, 859 { &vop_inactive_desc, (vop_t *) cd9660_inactive }, | 287 * Vnode op for reading. 288 */ 289static int 290cd9660_read(ap) 291 struct vop_read_args /* { 292 struct vnode *a_vp; 293 struct uio *a_uio; 294 int a_ioflag; --- 586 unchanged lines hidden (view full) --- 881static struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = { 882 { &vop_default_desc, (vop_t *) vop_defaultop }, 883 { &vop_abortop_desc, (vop_t *) cd9660_abortop }, 884 { &vop_access_desc, (vop_t *) cd9660_access }, 885 { &vop_bmap_desc, (vop_t *) cd9660_bmap }, 886 { &vop_cachedlookup_desc, (vop_t *) cd9660_lookup }, 887 { &vop_getattr_desc, (vop_t *) cd9660_getattr }, 888 { &vop_inactive_desc, (vop_t *) cd9660_inactive }, |
889 { &vop_ioctl_desc, (vop_t *) cd9660_ioctl }, |
|
860 { &vop_islocked_desc, (vop_t *) vop_stdislocked }, 861 { &vop_lock_desc, (vop_t *) vop_stdlock }, 862 { &vop_lookup_desc, (vop_t *) vfs_cache_lookup }, 863 { &vop_pathconf_desc, (vop_t *) cd9660_pathconf }, 864 { &vop_print_desc, (vop_t *) cd9660_print }, 865 { &vop_read_desc, (vop_t *) cd9660_read }, 866 { &vop_readdir_desc, (vop_t *) cd9660_readdir }, 867 { &vop_readlink_desc, (vop_t *) cd9660_readlink }, --- 51 unchanged lines hidden --- | 890 { &vop_islocked_desc, (vop_t *) vop_stdislocked }, 891 { &vop_lock_desc, (vop_t *) vop_stdlock }, 892 { &vop_lookup_desc, (vop_t *) vfs_cache_lookup }, 893 { &vop_pathconf_desc, (vop_t *) cd9660_pathconf }, 894 { &vop_print_desc, (vop_t *) cd9660_print }, 895 { &vop_read_desc, (vop_t *) cd9660_read }, 896 { &vop_readdir_desc, (vop_t *) cd9660_readdir }, 897 { &vop_readlink_desc, (vop_t *) cd9660_readlink }, --- 51 unchanged lines hidden --- |