cd9660_vfsops.c (97d5f7bb3b3599b1016490a8287cfbd2b761141a) | cd9660_vfsops.c (a13234bb35c2671d47ec5b12eb613bb5d62121f2) |
---|---|
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). --- 59 unchanged lines hidden (view full) --- 68 69static int cd9660_mount __P((struct mount *, 70 char *, caddr_t, struct nameidata *, struct proc *)); 71static int cd9660_unmount __P((struct mount *, int, struct proc *)); 72static int cd9660_root __P((struct mount *, struct vnode **)); 73static int cd9660_statfs __P((struct mount *, struct statfs *, struct proc *)); 74static int cd9660_vget __P((struct mount *, ino_t, struct vnode **)); 75static int cd9660_fhtovp __P((struct mount *, struct fid *, struct vnode **)); | 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). --- 59 unchanged lines hidden (view full) --- 68 69static int cd9660_mount __P((struct mount *, 70 char *, caddr_t, struct nameidata *, struct proc *)); 71static int cd9660_unmount __P((struct mount *, int, struct proc *)); 72static int cd9660_root __P((struct mount *, struct vnode **)); 73static int cd9660_statfs __P((struct mount *, struct statfs *, struct proc *)); 74static int cd9660_vget __P((struct mount *, ino_t, struct vnode **)); 75static int cd9660_fhtovp __P((struct mount *, struct fid *, struct vnode **)); |
76static int cd9660_checkexp __P((struct mount *, struct sockaddr *, 77 int *, struct ucred **)); | |
78static int cd9660_vptofh __P((struct vnode *, struct fid *)); 79 80static struct vfsops cd9660_vfsops = { 81 cd9660_mount, 82 vfs_stdstart, 83 cd9660_unmount, 84 cd9660_root, 85 vfs_stdquotactl, 86 cd9660_statfs, 87 vfs_stdsync, 88 cd9660_vget, 89 cd9660_fhtovp, | 76static int cd9660_vptofh __P((struct vnode *, struct fid *)); 77 78static struct vfsops cd9660_vfsops = { 79 cd9660_mount, 80 vfs_stdstart, 81 cd9660_unmount, 82 cd9660_root, 83 vfs_stdquotactl, 84 cd9660_statfs, 85 vfs_stdsync, 86 cd9660_vget, 87 cd9660_fhtovp, |
90 cd9660_checkexp, | 88 vfs_stdcheckexp, |
91 cd9660_vptofh, 92 cd9660_init, 93 cd9660_uninit, 94 vfs_stdextattrctl, 95}; 96VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY); 97MODULE_VERSION(cd9660, 1); 98 --- 103 unchanged lines hidden (view full) --- 202 203 /* 204 * If updating, check whether changing from read-only to 205 * read/write; if there is no device name, that's all we do. 206 */ 207 if (mp->mnt_flag & MNT_UPDATE) { 208 imp = VFSTOISOFS(mp); 209 if (args.fspec == 0) | 89 cd9660_vptofh, 90 cd9660_init, 91 cd9660_uninit, 92 vfs_stdextattrctl, 93}; 94VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY); 95MODULE_VERSION(cd9660, 1); 96 --- 103 unchanged lines hidden (view full) --- 200 201 /* 202 * If updating, check whether changing from read-only to 203 * read/write; if there is no device name, that's all we do. 204 */ 205 if (mp->mnt_flag & MNT_UPDATE) { 206 imp = VFSTOISOFS(mp); 207 if (args.fspec == 0) |
210 return (vfs_export(mp, &imp->im_export, &args.export)); | 208 return (vfs_export(mp, &args.export)); |
211 } 212 /* 213 * Not an update, or updating the name: look up the name 214 * and verify that it refers to a sensible block device. 215 */ 216 NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, p); 217 if ((error = namei(ndp))) 218 return (error); --- 429 unchanged lines hidden (view full) --- 648 *vpp = NULLVP; 649 return (ESTALE); 650 } 651 *vpp = nvp; 652 return (0); 653} 654 655int | 209 } 210 /* 211 * Not an update, or updating the name: look up the name 212 * and verify that it refers to a sensible block device. 213 */ 214 NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, p); 215 if ((error = namei(ndp))) 216 return (error); --- 429 unchanged lines hidden (view full) --- 646 *vpp = NULLVP; 647 return (ESTALE); 648 } 649 *vpp = nvp; 650 return (0); 651} 652 653int |
656cd9660_checkexp(mp, nam, exflagsp, credanonp) 657 struct mount *mp; 658 struct sockaddr *nam; 659 int *exflagsp; 660 struct ucred **credanonp; 661{ 662 register struct netcred *np; 663 register struct iso_mnt *imp; 664 665 imp = VFSTOISOFS(mp); 666 667 /* 668 * Get the export permission structure for this <mp, client> tuple. 669 */ 670 np = vfs_export_lookup(mp, &imp->im_export, nam); 671 if (np == NULL) 672 return (EACCES); 673 674 *exflagsp = np->netc_exflags; 675 *credanonp = &np->netc_anon; 676 return (0); 677} 678 679int | |
680cd9660_vget(mp, ino, vpp) 681 struct mount *mp; 682 ino_t ino; 683 struct vnode **vpp; 684{ 685 686 /* 687 * XXXX --- 216 unchanged lines hidden --- | 654cd9660_vget(mp, ino, vpp) 655 struct mount *mp; 656 ino_t ino; 657 struct vnode **vpp; 658{ 659 660 /* 661 * XXXX --- 216 unchanged lines hidden --- |