Lines Matching defs:fmode

132 static int vn_open_auth_finish(vnode_t vp, int fmode, vfs_context_t ctx);
155 vn_open(struct nameidata *ndp, int fmode, int cmode)
157 return(vn_open_modflags(ndp, &fmode, cmode));
172 vn_open_auth_finish(vnode_t vp, int fmode, vfs_context_t ctx)
176 if ((error = vnode_ref_ext(vp, fmode, 0)) != 0) {
184 mac_vnode_notify_open(ctx, vp, fmode);
201 vn_open_auth_do_create(struct nameidata *ndp, struct vnode_attr *vap, int fmode, boolean_t *did_create, boolean_t *did_open, vfs_context_t ctx)
213 if (fmode & O_EXCL)
230 error = vn_create(dvp, &ndp->ni_vp, ndp, vap, VN_CREATE_DOOPEN, fmode, &status, ctx);
358 int fmode;
373 fmode = *fmodep;
379 if (fmode & O_CREAT) {
380 if ( (fmode & O_DIRECTORY) ) {
396 if ((fmode & O_EXCL) == 0 && (fmode & O_NOFOLLOW) == 0 && (origcnflags & FOLLOW) != 0)
420 error = vn_open_auth_do_create(ndp, vap, fmode, &did_create, &did_open, ctx);
445 if (((error == EEXIST) && !(fmode & O_EXCL)) ||
446 ((error == ENOENT) && (fmode & O_CREAT))){
457 if (fmode & O_EXCL)
467 error = VNOP_COMPOUND_OPEN(dvp, &ndp->ni_vp, ndp, 0, fmode, NULL, NULL, ctx);
487 fmode &= ~O_CREAT;
506 if (fmode & O_NOFOLLOW || fmode & O_SYMLINK || (origcnflags & FOLLOW) == 0) {
520 error = VNOP_COMPOUND_OPEN(dvp, &ndp->ni_vp, ndp, 0, fmode, NULL, NULL, ctx);
560 error = vn_authorize_open_existing(vp, &ndp->ni_cnd, fmode, ctx, NULL);
578 error = cp_handle_open (vp, fmode);
585 error = VNOP_OPEN(vp, fmode, ctx);
601 fmode |= O_EVTONLY;
607 error = vn_open_auth_finish(vp, fmode, ctx);
615 fmode &= ~O_TRUNC;
617 *fmodep = fmode;
623 VNOP_CLOSE(vp, fmode, ctx);