summaryrefslogtreecommitdiff
path: root/sys/compat/osf1/osf1_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/osf1/osf1_misc.c')
-rw-r--r--sys/compat/osf1/osf1_misc.c40
1 files changed, 26 insertions, 14 deletions
diff --git a/sys/compat/osf1/osf1_misc.c b/sys/compat/osf1/osf1_misc.c
index bd611b4407c..f19e0594ea8 100644
--- a/sys/compat/osf1/osf1_misc.c
+++ b/sys/compat/osf1/osf1_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osf1_misc.c,v 1.7 1996/10/17 19:15:49 niklas Exp $ */
+/* $OpenBSD: osf1_misc.c,v 1.8 1996/10/30 16:37:19 niklas Exp $ */
/* $NetBSD: osf1_misc.c,v 1.7 1995/10/07 06:53:04 mycroft Exp $ */
/*
@@ -41,8 +41,10 @@
#include <sys/mount.h>
#include <sys/signal.h>
#include <sys/signalvar.h>
+#include <sys/socketvar.h>
#include <sys/reboot.h>
#include <sys/syscallargs.h>
+#include <sys/vnode.h>
#include <compat/osf1/osf1_syscall.h>
#include <compat/osf1/osf1_syscallargs.h>
@@ -61,6 +63,8 @@ extern void cpu_exec_ecoff_setregs __P((struct proc *, struct exec_package *,
extern char sigcode[], esigcode[];
+void cvtstat2osf1 __P((struct stat *, struct osf1_stat *));
+
struct emul emul_osf1 = {
"osf1",
NULL,
@@ -114,6 +118,7 @@ osf1_sys_setsysinfo(p, v, retval)
void *v;
register_t *retval;
{
+#if 0
struct osf1_setsysinfo_args /* {
syscallarg(u_long) op;
syscallarg(caddr_t) buffer;
@@ -121,6 +126,7 @@ osf1_sys_setsysinfo(p, v, retval)
syscallarg(caddr_t) arg;
syscallarg(u_long) flag;
} */ *uap = v;
+#endif;
return (0);
}
@@ -129,6 +135,7 @@ osf1_sys_setsysinfo(p, v, retval)
#define OSF1_RLIMIT_NOFILE 6 /* OSF1's RLIMIT_NOFILE */
#define OSF1_RLIMIT_NLIMITS 8 /* Number of OSF1 rlimits */
+int
osf1_sys_getrlimit(p, v, retval)
struct proc *p;
void *v;
@@ -157,6 +164,7 @@ osf1_sys_getrlimit(p, v, retval)
return sys_getrlimit(p, &a, retval);
}
+int
osf1_sys_setrlimit(p, v, retval)
struct proc *p;
void *v;
@@ -267,7 +275,7 @@ osf1_sys_usleep_thread(p, v, retval)
u_long ticks;
int error, s;
- if (error = copyin(SCARG(uap, sleep), &tv, sizeof tv))
+ if ((error = copyin(SCARG(uap, sleep), &tv, sizeof tv)) != 0)
return (error);
ticks = ((u_long)tv.tv_sec * 1000000 + tv.tv_usec) / tick;
@@ -314,6 +322,7 @@ struct osf1_stat {
* Get file status; this version follows links.
*/
/* ARGSUSED */
+int
osf1_sys_stat(p, v, retval)
struct proc *p;
void *v;
@@ -330,7 +339,7 @@ osf1_sys_stat(p, v, retval)
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
SCARG(uap, path), p);
- if (error = namei(&nd))
+ if ((error = namei(&nd)) != 0)
return (error);
error = vn_stat(nd.ni_vp, &sb, p);
vput(nd.ni_vp);
@@ -345,6 +354,7 @@ osf1_sys_stat(p, v, retval)
* Get file status; this version does not follow links.
*/
/* ARGSUSED */
+int
osf1_sys_lstat(p, v, retval)
struct proc *p;
void *v;
@@ -361,7 +371,7 @@ osf1_sys_lstat(p, v, retval)
NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF, UIO_USERSPACE,
SCARG(uap, path), p);
- if (error = namei(&nd))
+ if ((error = namei(&nd)) != 0)
return (error);
error = vn_stat(nd.ni_vp, &sb, p);
vput(nd.ni_vp);
@@ -375,6 +385,7 @@ osf1_sys_lstat(p, v, retval)
/*
* Return status information about a file descriptor.
*/
+int
osf1_sys_fstat(p, v, retval)
struct proc *p;
void *v;
@@ -420,6 +431,7 @@ osf1_sys_fstat(p, v, retval)
/*
* Convert from a stat structure to an osf1 stat structure.
*/
+void
cvtstat2osf1(st, ost)
struct stat *st;
struct osf1_stat *ost;
@@ -799,8 +811,8 @@ osf1_sys_readv(p, v, retval)
M_TEMP, M_WAITOK);
error = 0;
- if (error = copyin(SCARG(uap, iovp), oio,
- SCARG(uap, iovcnt) * sizeof (struct osf1_iovec)))
+ if ((error = copyin(SCARG(uap, iovp), oio,
+ SCARG(uap, iovcnt) * sizeof (struct osf1_iovec))) != 0)
goto punt;
for (i = 0; i < SCARG(uap, iovcnt); i++) {
nio[i].iov_base = oio[i].iov_base;
@@ -811,8 +823,8 @@ osf1_sys_readv(p, v, retval)
SCARG(&a, iovp) = (struct iovec *)STACKGAPBASE;
SCARG(&a, iovcnt) = SCARG(uap, iovcnt);
- if (error = copyout(nio, (caddr_t)SCARG(&a, iovp),
- SCARG(uap, iovcnt) * sizeof (struct iovec)))
+ if ((error = copyout(nio, (caddr_t)SCARG(&a, iovp),
+ SCARG(uap, iovcnt) * sizeof (struct iovec))) != 0)
goto punt;
error = sys_readv(p, &a, retval);
@@ -854,8 +866,8 @@ osf1_sys_writev(p, v, retval)
M_TEMP, M_WAITOK);
error = 0;
- if (error = copyin(SCARG(uap, iovp), oio,
- SCARG(uap, iovcnt) * sizeof (struct osf1_iovec)))
+ if ((error = copyin(SCARG(uap, iovp), oio,
+ SCARG(uap, iovcnt) * sizeof (struct osf1_iovec))) != 0)
goto punt;
for (i = 0; i < SCARG(uap, iovcnt); i++) {
nio[i].iov_base = oio[i].iov_base;
@@ -866,8 +878,8 @@ osf1_sys_writev(p, v, retval)
SCARG(&a, iovp) = (struct iovec *)STACKGAPBASE;
SCARG(&a, iovcnt) = SCARG(uap, iovcnt);
- if (error = copyout(nio, (caddr_t)SCARG(&a, iovp),
- SCARG(uap, iovcnt) * sizeof (struct iovec)))
+ if ((error = copyout(nio, (caddr_t)SCARG(&a, iovp),
+ SCARG(uap, iovcnt) * sizeof (struct iovec))) != 0)
goto punt;
error = sys_writev(p, &a, retval);
@@ -965,9 +977,9 @@ osf1_sys_execve(p, v, retval)
register_t *retval;
{
struct osf1_sys_execve_args *uap = v;
-
- caddr_t sg = stackgap_init(p->p_emul);
#if 0
+ caddr_t sg = stackgap_init(p->p_emul);
+
OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
#endif