Print this page
onc plus-be-gone

*** 17,27 **** * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ - /* ONC_PLUS EXTRACT START */ /* * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */ --- 17,26 ----
*** 32,53 **** * Portions of this source code were derived from Berkeley 4.3 BSD * under license from the Regents of the University of California. */ - /* ONC_PLUS EXTRACT END */ - #include <sys/param.h> #include <sys/isa_defs.h> #include <sys/types.h> #include <sys/sysmacros.h> #include <sys/systm.h> #include <sys/errno.h> #include <sys/fcntl.h> - /* ONC_PLUS EXTRACT START */ #include <sys/flock.h> - /* ONC_PLUS EXTRACT END */ #include <sys/vnode.h> #include <sys/file.h> #include <sys/mode.h> #include <sys/proc.h> #include <sys/filio.h> --- 31,48 ----
*** 56,66 **** #include <sys/rctl.h> #include <sys/nbmlock.h> #include <sys/cmn_err.h> - /* ONC_PLUS EXTRACT START */ static int flock_check(vnode_t *, flock64_t *, offset_t, offset_t); static int flock_get_start(vnode_t *, flock64_t *, offset_t, u_offset_t *); static void fd_too_big(proc_t *); /* --- 51,60 ----
*** 148,159 **** goto out; } iarg = (int)arg; switch (cmd) { - /* ONC_PLUS EXTRACT END */ - case F_DUPFD: case F_DUPFD_CLOEXEC: p = curproc; if ((uint_t)iarg >= p->p_fno_ctl) { if (iarg >= 0) --- 142,151 ----
*** 273,283 **** vp = fp->f_vnode; flag = fp->f_flag; offset = fp->f_offset; switch (cmd) { - /* ONC_PLUS EXTRACT START */ /* * The file system and vnode layers understand and implement * locking with flock64 structures. So here once we pass through * the test for compatibility as defined by LFS API, (for F_SETLK, * F_SETLKW, F_GETLK, F_GETLKW, F_FREESP) we transform --- 265,274 ----
*** 448,458 **** error = EFAULT; } #endif } break; - /* ONC_PLUS EXTRACT END */ case F_CHKFL: /* * This is for internal use only, to allow the vnode layer * to validate a flags setting before applying it. User --- 439,448 ----
*** 595,605 **** error = VOP_SPACE(vp, cmd, &bf, flag, offset, fp->f_cred, NULL); break; #if !defined(_LP64) || defined(_SYSCALL32_IMPL) - /* ONC_PLUS EXTRACT START */ case F_GETLK64: case F_SETLK64: case F_SETLKW64: case F_SETLK64_NBMAND: /* --- 585,594 ----
*** 678,691 **** bf64_32.l_pid = (pid32_t)bf.l_pid; if (copyout(&bf64_32, (void *)arg, sizeof (bf64_32))) error = EFAULT; } break; - /* ONC_PLUS EXTRACT END */ #endif /* !defined(_LP64) || defined(_SYSCALL32_IMPL) */ - /* ONC_PLUS EXTRACT START */ case F_SHARE: case F_SHARE_NBMAND: case F_UNSHARE: /* --- 667,678 ----
*** 706,716 **** shr_own.sl_pid = shr.s_pid; shr_own.sl_id = fsh.f_id; shr.s_own_len = sizeof (shr_own); shr.s_owner = (caddr_t)&shr_own; error = VOP_SHRLOCK(vp, cmd, &shr, flag, fp->f_cred, NULL); - /* ONC_PLUS EXTRACT END */ break; default: error = EINVAL; break; --- 693,702 ----
*** 725,735 **** if (error) return (set_errno(error)); return (retval); } - /* ONC_PLUS EXTRACT START */ int flock_check(vnode_t *vp, flock64_t *flp, offset_t offset, offset_t max) { struct vattr vattr; int error; --- 711,720 ----
*** 837,842 **** mutex_enter(&p->p_lock); (void) rctl_action(rctlproc_legacy[RLIMIT_NOFILE], p->p_rctls, p, RCA_SAFE); mutex_exit(&p->p_lock); } - /* ONC_PLUS EXTRACT END */ --- 822,826 ----