summaryrefslogtreecommitdiffstats
path: root/sys/i386/ibcs2/ibcs2_other.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-11-06 19:29:57 +0000
committerphk <phk@FreeBSD.org>1997-11-06 19:29:57 +0000
commit4c8218a5c7d132b8ae0bd2a5a677455d69fabaab (patch)
tree70e3bdde81d385220c0b0de7410976c4e83e5bbd /sys/i386/ibcs2/ibcs2_other.c
parent363a7ddf8560aa6b11580adeb58853d719217b26 (diff)
downloadFreeBSD-src-4c8218a5c7d132b8ae0bd2a5a677455d69fabaab.zip
FreeBSD-src-4c8218a5c7d132b8ae0bd2a5a677455d69fabaab.tar.gz
Move the "retval" (3rd) parameter from all syscall functions and put
it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled.
Diffstat (limited to 'sys/i386/ibcs2/ibcs2_other.c')
-rw-r--r--sys/i386/ibcs2/ibcs2_other.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/sys/i386/ibcs2/ibcs2_other.c b/sys/i386/ibcs2/ibcs2_other.c
index 21e9f28..621a382 100644
--- a/sys/i386/ibcs2/ibcs2_other.c
+++ b/sys/i386/ibcs2/ibcs2_other.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: ibcs2_other.c,v 1.6 1997/07/20 09:39:45 bde Exp $
+ * $Id: ibcs2_other.c,v 1.7 1997/08/25 21:57:55 bde Exp $
*/
/*
@@ -41,12 +41,12 @@
#define IBCS2_SECURE_SETLUID 2
int
-ibcs2_secure(struct proc *p, struct ibcs2_secure_args *uap, int *retval)
+ibcs2_secure(struct proc *p, struct ibcs2_secure_args *uap)
{
switch (uap->cmd) {
case IBCS2_SECURE_GETLUID: /* get login uid */
- *retval = p->p_ucred->cr_uid;
+ p->p_retval[0] = p->p_ucred->cr_uid;
return 0;
case IBCS2_SECURE_SETLUID: /* set login uid */
@@ -60,17 +60,15 @@ ibcs2_secure(struct proc *p, struct ibcs2_secure_args *uap, int *retval)
}
int
-ibcs2_lseek(struct proc *p, register struct ibcs2_lseek_args *uap, int *retval)
+ibcs2_lseek(struct proc *p, register struct ibcs2_lseek_args *uap)
{
struct lseek_args largs;
- off_t lret;
int error;
largs.fd = uap->fd;
largs.offset = uap->offset;
largs.whence = uap->whence;
- error = lseek(p, &largs, (int *)&lret);
- *(long *)retval = lret;
+ error = lseek(p, &largs);
return (error);
}
@@ -79,7 +77,7 @@ ibcs2_lseek(struct proc *p, register struct ibcs2_lseek_args *uap, int *retval)
#include <sys/un.h>
int
-spx_open(struct proc *p, void *uap, int *retval)
+spx_open(struct proc *p, void *uap)
{
struct socket_args sock;
struct connect_args conn;
@@ -92,7 +90,7 @@ spx_open(struct proc *p, void *uap, int *retval)
sock.domain = AF_UNIX;
sock.type = SOCK_STREAM;
sock.protocol = 0;
- error = socket(p, &sock, retval);
+ error = socket(p, &sock);
if (error)
return error;
@@ -104,17 +102,17 @@ spx_open(struct proc *p, void *uap, int *retval)
strlen(Xaddr->sun_path) + 1;
copyout("/tmp/.X11-unix/X0", Xaddr->sun_path, 18);
- conn.s = fd = *retval;
+ conn.s = fd = p->p_retval[0];
conn.name = (caddr_t)Xaddr;
conn.namelen = sizeof(struct sockaddr_un);
- error = connect(p, &conn, retval);
+ error = connect(p, &conn);
if (error) {
struct close_args cl;
cl.fd = fd;
- close(p, &cl, retval);
+ close(p, &cl);
return error;
}
- *retval = fd;
+ p->p_retval[0] = fd;
return 0;
}
#endif /* SPX_HACK */
OpenPOWER on IntegriCloud