Print this page
onc plus-be-gone
@@ -17,11 +17,10 @@
* 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.
*/
@@ -32,22 +31,18 @@
* 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>
@@ -56,11 +51,10 @@
#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 *);
/*
@@ -148,12 +142,10 @@
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)
@@ -273,11 +265,10 @@
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
@@ -448,11 +439,10 @@
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
@@ -595,11 +585,10 @@
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:
/*
@@ -678,14 +667,12 @@
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:
/*
@@ -706,11 +693,10 @@
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;
@@ -725,11 +711,10 @@
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;
@@ -837,6 +822,5 @@
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 */