udf_vnops.c (184205) | udf_vnops.c (184413) |
---|---|
1/*- 2 * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/fs/udf/udf_vnops.c 184205 2008-10-23 15:53:51Z des $ | 26 * $FreeBSD: head/sys/fs/udf/udf_vnops.c 184413 2008-10-28 13:44:11Z trasz $ |
27 */ 28 29/* udf_vnops.c */ 30/* Take care of the vnode side of things */ 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/namei.h> --- 99 unchanged lines hidden (view full) --- 134 return (mode); 135} 136 137static int 138udf_access(struct vop_access_args *a) 139{ 140 struct vnode *vp; 141 struct udf_node *node; | 27 */ 28 29/* udf_vnops.c */ 30/* Take care of the vnode side of things */ 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/namei.h> --- 99 unchanged lines hidden (view full) --- 134 return (mode); 135} 136 137static int 138udf_access(struct vop_access_args *a) 139{ 140 struct vnode *vp; 141 struct udf_node *node; |
142 mode_t a_mode, mode; | 142 accmode_t accmode; 143 mode_t mode; |
143 144 vp = a->a_vp; 145 node = VTON(vp); | 144 145 vp = a->a_vp; 146 node = VTON(vp); |
146 a_mode = a->a_mode; | 147 accmode = a->a_accmode; |
147 | 148 |
148 if (a_mode & VWRITE) { | 149 if (accmode & VWRITE) { |
149 switch (vp->v_type) { 150 case VDIR: 151 case VLNK: 152 case VREG: 153 return (EROFS); 154 /* NOT REACHED */ 155 default: 156 break; 157 } 158 } 159 160 mode = udf_permtomode(node); 161 162 return (vaccess(vp->v_type, mode, node->fentry->uid, node->fentry->gid, | 150 switch (vp->v_type) { 151 case VDIR: 152 case VLNK: 153 case VREG: 154 return (EROFS); 155 /* NOT REACHED */ 156 default: 157 break; 158 } 159 } 160 161 mode = udf_permtomode(node); 162 163 return (vaccess(vp->v_type, mode, node->fentry->uid, node->fentry->gid, |
163 a_mode, a->a_cred, NULL)); | 164 accmode, a->a_cred, NULL)); |
164} 165 166static int 167udf_open(struct vop_open_args *ap) { 168 struct udf_node *np = VTON(ap->a_vp); 169 off_t fsize; 170 171 fsize = le64toh(np->fentry->inf_len); --- 1059 unchanged lines hidden --- | 165} 166 167static int 168udf_open(struct vop_open_args *ap) { 169 struct udf_node *np = VTON(ap->a_vp); 170 off_t fsize; 171 172 fsize = le64toh(np->fentry->inf_len); --- 1059 unchanged lines hidden --- |