diff options
author | Suhasini Peddada <Suhasini.Peddada@Sun.COM> | 2009-04-09 08:31:26 -0700 |
---|---|---|
committer | Suhasini Peddada <Suhasini.Peddada@Sun.COM> | 2009-04-09 08:31:26 -0700 |
commit | 33955159cb1986f928cecc2ba4206333735ca5c7 (patch) | |
tree | 7381d9c8b023892e4066bab966151e197df55213 /usr/src | |
parent | 5e358f39b60a8cd323fba47c4a7f79e7096cd0e6 (diff) | |
download | illumos-gate-33955159cb1986f928cecc2ba4206333735ca5c7.tar.gz |
backout 6816423: needs more work
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/fs/proc/prcontrol.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/usr/src/uts/common/fs/proc/prcontrol.c b/usr/src/uts/common/fs/proc/prcontrol.c index cc52c8fdbf..e67ba67e04 100644 --- a/usr/src/uts/common/fs/proc/prcontrol.c +++ b/usr/src/uts/common/fs/proc/prcontrol.c @@ -20,10 +20,12 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +#pragma ident "%Z%%M% %I% %E% SMI" + #include <sys/types.h> #include <sys/uio.h> #include <sys/param.h> @@ -194,7 +196,7 @@ ctlsize(long cmd, size_t resid, arg_t *argp) size += sizeof (long); break; default: - return (-1); + return (0); } /* Round up to a multiple of long, unless exact amount written */ @@ -255,15 +257,8 @@ prwritectl(vnode_t *vp, uio_t *uiop, cred_t *cr) arg_t *argp = (arg_t *)&bufp[1]; size = ctlsize(cmd, resid, argp); - if (size == -1) { /* invalid command */ - if (locked) { - prunlock(pnp); - locked = 0; - } - return (resid? EINVAL : 0); - } else if (size == 0) { /* incomplete command */ + if (size == 0) /* incomplete or invalid command */ break; - } /* * Perform the specified control operation. */ @@ -673,15 +668,8 @@ prwritectl32(struct vnode *vp, struct uio *uiop, cred_t *cr) arg32_t *argp = (arg32_t *)&bufp[1]; size = ctlsize32(cmd, resid, argp); - if (size == -1) { /* invalid command */ - if (locked) { - prunlock(pnp); - locked = 0; - } - return (resid? EINVAL : 0); - } else if (size == 0) { /* incomplete command */ + if (size == 0) /* incomplete or invalid command */ break; - } /* * Perform the specified control operation. */ |