diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 04:47:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 04:47:45 +0000 |
commit | 9043b73586e8eff30f33a97a5b1802f1032c3288 (patch) | |
tree | 5238a6096e950295682af33b86d1ed58fe4b596e /sys/compat/svr4/svr4_fcntl.c | |
parent | dd79441110b3311ff76301f49a0a640d84ead876 (diff) |
update from netbsd
Diffstat (limited to 'sys/compat/svr4/svr4_fcntl.c')
-rw-r--r-- | sys/compat/svr4/svr4_fcntl.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c index a2421d32fc7..11f7d5f46f5 100644 --- a/sys/compat/svr4/svr4_fcntl.c +++ b/sys/compat/svr4/svr4_fcntl.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_fcntl.c,v 1.13 1995/10/09 23:56:17 thorpej Exp $ */ +/* $NetBSD: svr4_fcntl.c,v 1.14 1995/10/14 20:24:24 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -48,11 +48,18 @@ #include <compat/svr4/svr4_fcntl.h> #include <compat/svr4/svr4_poll.h> +static u_long svr4_to_bsd_cmd __P((u_long)); +static int svr4_to_bsd_flags __P((int)); +static int bsd_to_svr4_flags __P((int)); +static void bsd_to_svr4_flock __P((struct flock *, struct svr4_flock *)); +static void svr4_to_bsd_flock __P((struct svr4_flock *, struct flock *)); +static void svr4_pollscan __P((struct proc *, struct svr4_pollfd *, int, + register_t *)); + static u_long svr4_to_bsd_cmd(cmd) - u_long cmd; + u_long cmd; { - switch (cmd) { case SVR4_F_DUPFD: return F_DUPFD; @@ -276,7 +283,8 @@ svr4_sys_fcntl(p, v, retval) return error; case F_SETFL: - SCARG(&fa, arg) = (void *) svr4_to_bsd_flags(SCARG(uap, arg)); + SCARG(&fa, arg) = + (void *) svr4_to_bsd_flags((u_long) SCARG(uap, arg)); return sys_fcntl(p, &fa, retval); case F_GETLK: @@ -377,13 +385,12 @@ svr4_sys_poll(p, v, retval) int msec = SCARG(uap, timeout); struct timeval atv; int timo; - u_int ni; int ncoll; extern int nselcoll, selwait; pl = (struct svr4_pollfd *) malloc(sz, M_TEMP, M_WAITOK); - if (error = copyin(SCARG(uap, fds), pl, sz)) + if ((error = copyin(SCARG(uap, fds), pl, sz)) != 0) goto bad; for (i = 0; i < SCARG(uap, nfds); i++) { @@ -440,7 +447,7 @@ done: if (error == EWOULDBLOCK) error = 0; - if (error2 = copyout(pl, SCARG(uap, fds), sz)) + if ((error2 = copyout(pl, SCARG(uap, fds), sz)) != 0) error = error2; bad: |