Lines Matching defs:fmode
137 int fmode, error;
140 fmode = *flagp;
141 if (fmode & O_CREAT) {
144 if ((fmode & O_EXCL) == 0 && (fmode & O_NOFOLLOW) == 0)
157 if (fmode & O_EXCL)
180 fmode &= ~O_TRUNC;
189 if (fmode & O_EXCL) {
193 fmode &= ~O_CREAT;
198 ((fmode & O_NOFOLLOW) ? NOFOLLOW : FOLLOW) | LOCKLEAF;
199 if (!(fmode & FWRITE))
209 error = vn_open_vnode(vp, fmode, cred, td, fp);
212 *flagp = fmode;
217 *flagp = fmode;
227 vn_open_vnode(struct vnode *vp, int fmode, struct ucred *cred,
239 if (vp->v_type != VDIR && fmode & O_DIRECTORY)
242 if (fmode & (FWRITE | O_TRUNC)) {
247 if (fmode & FREAD)
249 if (fmode & FEXEC)
251 if ((fmode & O_APPEND) && (fmode & FWRITE))
258 if ((fmode & O_CREAT) == 0) {
272 if ((error = VOP_OPEN(vp, fmode, cred, td, fp)) != 0)
275 if (fmode & (O_EXLOCK | O_SHLOCK)) {
282 if (fmode & O_EXLOCK)
287 if ((fmode & FNONBLOCK) == 0)
314 (void)VOP_CLOSE(vp, fmode, cred, td);
320 if (fmode & FWRITE) {