- massive warning fix fest.
- fix pread/pwrite return values (plus some other syscalls that looked similarly broken). - prototypes and clean up for netbsd32_ioctl.c now getpw*() works under compat32!
This commit is contained in:
parent
152f5c5f28
commit
8f9515257a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32.h,v 1.10 1999/12/30 15:40:45 eeh Exp $ */
|
||||
/* $NetBSD: netbsd32.h,v 1.11 2000/07/09 13:39:31 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Matthew R. Green
|
||||
|
@ -39,6 +39,8 @@
|
|||
*/
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
/*
|
||||
* first, define all the types we need.
|
||||
|
@ -285,6 +287,18 @@ struct netbsd32_sembuf {
|
|||
typedef u_int32_t netbsd32_shmid_dsp_t;
|
||||
struct netbsd32_shmid_ds {
|
||||
struct netbsd32_ipc_perm shm_perm; /* operation permission structure */
|
||||
size_t shm_segsz; /* size of segment in bytes */
|
||||
pid_t shm_lpid; /* process ID of last shm op */
|
||||
pid_t shm_cpid; /* process ID of creator */
|
||||
shmatt_t shm_nattch; /* number of current attaches */
|
||||
netbsd32_time_t shm_atime; /* time of last shmat() */
|
||||
netbsd32_time_t shm_dtime; /* time of last shmdt() */
|
||||
netbsd32_time_t shm_ctime; /* time of last change by shmctl() */
|
||||
netbsd32_voidp _shm_internal; /* sysv stupidity */
|
||||
};
|
||||
|
||||
struct netbsd32_shmid_ds14 {
|
||||
struct netbsd32_ipc_perm14 shm_perm; /* operation permission structure */
|
||||
int shm_segsz; /* size of segment in bytes */
|
||||
pid_t shm_lpid; /* process ID of last shm op */
|
||||
pid_t shm_cpid; /* process ID of creator */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_compat_13.c,v 1.6 2000/03/30 11:27:18 augustss Exp $ */
|
||||
/* $NetBSD: netbsd32_compat_13.c,v 1.7 2000/07/09 13:39:31 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Matthew R. Green
|
||||
|
@ -33,6 +33,7 @@
|
|||
#include <sys/mount.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/syscallargs.h>
|
||||
|
||||
#include <compat/netbsd32/netbsd32.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_compat_14.c,v 1.2 1999/12/30 15:40:45 eeh Exp $ */
|
||||
/* $NetBSD: netbsd32_compat_14.c,v 1.3 2000/07/09 13:39:31 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Eduardo E. Horvath
|
||||
|
@ -47,7 +47,24 @@
|
|||
#include <compat/netbsd32/netbsd32.h>
|
||||
#include <compat/netbsd32/netbsd32_syscallargs.h>
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_ipc_perm14_to_native(struct netbsd32_ipc_perm14 *, struct ipc_perm *);
|
||||
static __inline void
|
||||
native_to_netbsd32_ipc_perm14(struct ipc_perm *, struct netbsd32_ipc_perm14 *);
|
||||
static __inline void
|
||||
native_to_netbsd32_msqid_ds14(struct msqid_ds *, struct netbsd32_msqid_ds14 *);
|
||||
static __inline void
|
||||
netbsd32_msqid_ds14_to_native(struct netbsd32_msqid_ds14 *, struct msqid_ds *);
|
||||
static __inline void
|
||||
native_to_netbsd32_semid_ds14(struct semid_ds *, struct netbsd32_semid_ds14 *);
|
||||
static __inline void
|
||||
netbsd32_semid_ds14_to_native(struct netbsd32_semid_ds14 *, struct semid_ds *);
|
||||
static __inline void
|
||||
netbsd32_shmid_ds14_to_native(struct netbsd32_shmid_ds14 *, struct shmid_ds *);
|
||||
static __inline void
|
||||
native_to_netbsd32_shmid_ds14(struct shmid_ds *, struct netbsd32_shmid_ds14 *);
|
||||
|
||||
static __inline void
|
||||
netbsd32_ipc_perm14_to_native(operm, perm)
|
||||
struct netbsd32_ipc_perm14 *operm;
|
||||
struct ipc_perm *perm;
|
||||
|
@ -62,7 +79,7 @@ netbsd32_ipc_perm14_to_native(operm, perm)
|
|||
#undef CVT
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
native_to_netbsd32_ipc_perm14(perm, operm)
|
||||
struct ipc_perm *perm;
|
||||
struct netbsd32_ipc_perm14 *operm;
|
||||
|
@ -83,7 +100,7 @@ native_to_netbsd32_ipc_perm14(perm, operm)
|
|||
operm->key = (key_t)perm->_key;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_msqid_ds14_to_native(omsqbuf, msqbuf)
|
||||
struct netbsd32_msqid_ds14 *omsqbuf;
|
||||
struct msqid_ds *msqbuf;
|
||||
|
@ -102,7 +119,7 @@ netbsd32_msqid_ds14_to_native(omsqbuf, msqbuf)
|
|||
#undef CVT
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
native_to_netbsd32_msqid_ds14(msqbuf, omsqbuf)
|
||||
struct msqid_ds *msqbuf;
|
||||
struct netbsd32_msqid_ds14 *omsqbuf;
|
||||
|
@ -126,6 +143,77 @@ native_to_netbsd32_msqid_ds14(msqbuf, omsqbuf)
|
|||
omsqbuf->msg_cbytes = msqbuf->_msg_cbytes;
|
||||
}
|
||||
|
||||
static __inline void
|
||||
netbsd32_semid_ds14_to_native(osembuf, sembuf)
|
||||
struct netbsd32_semid_ds14 *osembuf;
|
||||
struct semid_ds *sembuf;
|
||||
{
|
||||
|
||||
netbsd32_ipc_perm14_to_native(&osembuf->sem_perm, &sembuf->sem_perm);
|
||||
|
||||
#define CVT(x) sembuf->x = osembuf->x
|
||||
CVT(sem_nsems);
|
||||
CVT(sem_otime);
|
||||
CVT(sem_ctime);
|
||||
#undef CVT
|
||||
}
|
||||
|
||||
static __inline void
|
||||
native_to_netbsd32_semid_ds14(sembuf, osembuf)
|
||||
struct semid_ds *sembuf;
|
||||
struct netbsd32_semid_ds14 *osembuf;
|
||||
{
|
||||
|
||||
native_to_netbsd32_ipc_perm14(&sembuf->sem_perm, &osembuf->sem_perm);
|
||||
|
||||
#define CVT(x) osembuf->x = sembuf->x
|
||||
CVT(sem_nsems);
|
||||
CVT(sem_otime);
|
||||
CVT(sem_ctime);
|
||||
#undef CVT
|
||||
}
|
||||
|
||||
static __inline void
|
||||
netbsd32_shmid_ds14_to_native(oshmbuf, shmbuf)
|
||||
struct netbsd32_shmid_ds14 *oshmbuf;
|
||||
struct shmid_ds *shmbuf;
|
||||
{
|
||||
|
||||
netbsd32_ipc_perm14_to_native(&oshmbuf->shm_perm, &shmbuf->shm_perm);
|
||||
|
||||
#define CVT(x) shmbuf->x = oshmbuf->x
|
||||
CVT(shm_segsz);
|
||||
CVT(shm_lpid);
|
||||
CVT(shm_cpid);
|
||||
CVT(shm_nattch);
|
||||
CVT(shm_atime);
|
||||
CVT(shm_dtime);
|
||||
CVT(shm_ctime);
|
||||
#undef CVT
|
||||
}
|
||||
|
||||
static __inline void
|
||||
native_to_netbsd32_shmid_ds14(shmbuf, oshmbuf)
|
||||
struct shmid_ds *shmbuf;
|
||||
struct netbsd32_shmid_ds14 *oshmbuf;
|
||||
{
|
||||
|
||||
native_to_ipc_perm14(&shmbuf->shm_perm, &oshmbuf->shm_perm);
|
||||
|
||||
#define CVT(x) oshmbuf->x = shmbuf->x
|
||||
CVT(shm_segsz);
|
||||
CVT(shm_lpid);
|
||||
CVT(shm_cpid);
|
||||
CVT(shm_nattch);
|
||||
CVT(shm_atime);
|
||||
CVT(shm_dtime);
|
||||
CVT(shm_ctime);
|
||||
#undef CVT
|
||||
}
|
||||
|
||||
/*
|
||||
* the compat_14 system calls
|
||||
*/
|
||||
int
|
||||
compat_14_netbsd32_msgctl(p, v, retval)
|
||||
struct proc *p;
|
||||
|
@ -144,7 +232,8 @@ compat_14_netbsd32_msgctl(p, v, retval)
|
|||
cmd = SCARG(uap, cmd);
|
||||
|
||||
if (cmd == IPC_SET) {
|
||||
error = copyin(SCARG(uap, buf), &omsqbuf, sizeof(omsqbuf));
|
||||
error = copyin((caddr_t)(u_long)SCARG(uap, buf), &omsqbuf,
|
||||
sizeof(omsqbuf));
|
||||
if (error)
|
||||
return (error);
|
||||
netbsd32_msqid_ds14_to_native(&omsqbuf, &msqbuf);
|
||||
|
@ -155,43 +244,13 @@ compat_14_netbsd32_msgctl(p, v, retval)
|
|||
|
||||
if (error == 0 && cmd == IPC_STAT) {
|
||||
native_to_netbsd32_msqid_ds14(&msqbuf, &omsqbuf);
|
||||
error = copyout(&omsqbuf, SCARG(uap, buf), sizeof(omsqbuf));
|
||||
error = copyout(&omsqbuf, (caddr_t)(u_long)SCARG(uap, buf),
|
||||
sizeof(omsqbuf));
|
||||
}
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
netbsd32_semid_ds14_to_native(osembuf, sembuf)
|
||||
struct semid_ds14 *osembuf;
|
||||
struct semid_ds *sembuf;
|
||||
{
|
||||
|
||||
netbsd32_ipc_perm14_to_native(&osembuf->sem_perm, &sembuf->sem_perm);
|
||||
|
||||
#define CVT(x) sembuf->x = osembuf->x
|
||||
CVT(sem_nsems);
|
||||
CVT(sem_otime);
|
||||
CVT(sem_ctime);
|
||||
#undef CVT
|
||||
}
|
||||
|
||||
void
|
||||
native_to_netbsd32_semid_ds14(sembuf, osembuf)
|
||||
struct semid_ds *sembuf;
|
||||
struct semid_ds14 *osembuf;
|
||||
{
|
||||
|
||||
native_to_netbsd32_ipc_perm14(&sembuf->sem_perm, &osembuf->sem_perm);
|
||||
|
||||
#define CVT(x) osembuf->x = sembuf->x
|
||||
CVT(sem_nsems);
|
||||
CVT(sem_otime);
|
||||
CVT(sem_ctime);
|
||||
#undef CVT
|
||||
}
|
||||
|
||||
int
|
||||
compat_14_netbsd32___semctl(p, v, retval)
|
||||
struct proc *p;
|
||||
|
@ -226,7 +285,8 @@ compat_14_netbsd32___semctl(p, v, retval)
|
|||
}
|
||||
|
||||
if (pass_arg != NULL) {
|
||||
error = copyin(SCARG(uap, arg), &arg, sizeof(arg));
|
||||
error = copyin((caddr_t)(u_long)SCARG(uap, arg), &arg,
|
||||
sizeof(arg));
|
||||
if (error)
|
||||
return (error);
|
||||
if (cmd == IPC_SET) {
|
||||
|
@ -248,45 +308,6 @@ compat_14_netbsd32___semctl(p, v, retval)
|
|||
return (error);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
netbsd32_shmid_ds14_to_native(oshmbuf, shmbuf)
|
||||
struct shmid_ds14 *oshmbuf;
|
||||
struct shmid_ds *shmbuf;
|
||||
{
|
||||
|
||||
netbsd32_ipc_perm14_to_native(&oshmbuf->shm_perm, &shmbuf->shm_perm);
|
||||
|
||||
#define CVT(x) shmbuf->x = oshmbuf->x
|
||||
CVT(shm_segsz);
|
||||
CVT(shm_lpid);
|
||||
CVT(shm_cpid);
|
||||
CVT(shm_nattch);
|
||||
CVT(shm_atime);
|
||||
CVT(shm_dtime);
|
||||
CVT(shm_ctime);
|
||||
#undef CVT
|
||||
}
|
||||
|
||||
void
|
||||
native_to_netbsd32_shmid_ds14(shmbuf, oshmbuf)
|
||||
struct shmid_ds *shmbuf;
|
||||
struct shmid_ds14 *oshmbuf;
|
||||
{
|
||||
|
||||
native_to_ipc_perm14(&shmbuf->shm_perm, &oshmbuf->shm_perm);
|
||||
|
||||
#define CVT(x) oshmbuf->x = shmbuf->x
|
||||
CVT(shm_segsz);
|
||||
CVT(shm_lpid);
|
||||
CVT(shm_cpid);
|
||||
CVT(shm_nattch);
|
||||
CVT(shm_atime);
|
||||
CVT(shm_dtime);
|
||||
CVT(shm_ctime);
|
||||
#undef CVT
|
||||
}
|
||||
|
||||
int
|
||||
compat_14_netbsd32_shmctl(p, v, retval)
|
||||
struct proc *p;
|
||||
|
@ -305,7 +326,8 @@ compat_14_netbsd32_shmctl(p, v, retval)
|
|||
cmd = SCARG(uap, cmd);
|
||||
|
||||
if (cmd == IPC_SET) {
|
||||
error = copyin(SCARG(uap, buf), &oshmbuf, sizeof(oshmbuf));
|
||||
error = copyin((caddr_t)(u_long)SCARG(uap, buf), &oshmbuf,
|
||||
sizeof(oshmbuf));
|
||||
if (error)
|
||||
return (error);
|
||||
netbsd32_shmid_ds14_to_native(&oshmbuf, &shmbuf);
|
||||
|
@ -316,7 +338,8 @@ compat_14_netbsd32_shmctl(p, v, retval)
|
|||
|
||||
if (error == 0 && cmd == IPC_STAT) {
|
||||
native_to_netbsd32_shmid_ds14(&shmbuf, &oshmbuf);
|
||||
error = copyout(&oshmbuf, SCARG(uap, buf), sizeof(oshmbuf));
|
||||
error = copyout(&oshmbuf, (caddr_t)(u_long)SCARG(uap, buf),
|
||||
sizeof(oshmbuf));
|
||||
}
|
||||
|
||||
return (error);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_ioctl.c,v 1.5 1999/12/30 15:40:45 eeh Exp $ */
|
||||
/* $NetBSD: netbsd32_ioctl.c,v 1.6 2000/07/09 13:39:31 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Matthew R. Green
|
||||
|
@ -61,7 +61,50 @@
|
|||
#include <compat/netbsd32/netbsd32_ioctl.h>
|
||||
#include <compat/netbsd32/netbsd32_syscallargs.h>
|
||||
|
||||
void
|
||||
/* prototypes for the converters */
|
||||
static __inline void
|
||||
netbsd32_to_fbcmap(struct netbsd32_fbcmap *, struct fbcmap *);
|
||||
static __inline void
|
||||
netbsd32_to_fbcursor(struct netbsd32_fbcursor *, struct fbcursor *);
|
||||
static __inline void
|
||||
netbsd32_to_opiocdesc(struct netbsd32_opiocdesc *, struct opiocdesc *);
|
||||
static __inline void
|
||||
netbsd32_to_partinfo(struct netbsd32_partinfo *, struct partinfo *);
|
||||
static __inline void
|
||||
netbsd32_to_format_op(struct netbsd32_format_op *, struct format_op *);
|
||||
static __inline void
|
||||
netbsd32_to_ifconf(struct netbsd32_ifconf *, struct ifconf *);
|
||||
static __inline void
|
||||
netbsd32_to_ifmediareq(struct netbsd32_ifmediareq *, struct ifmediareq *);
|
||||
static __inline void
|
||||
netbsd32_to_ifdrv(struct netbsd32_ifdrv *, struct ifdrv *);
|
||||
static __inline void
|
||||
netbsd32_to_sioc_vif_req(struct netbsd32_sioc_vif_req *, struct sioc_vif_req *);
|
||||
static __inline void
|
||||
netbsd32_to_sioc_sg_req(struct netbsd32_sioc_sg_req *, struct sioc_sg_req *);
|
||||
|
||||
static __inline void
|
||||
netbsd32_from_fbcmap(struct fbcmap *, struct netbsd32_fbcmap *);
|
||||
static __inline void
|
||||
netbsd32_from_fbcursor(struct fbcursor *, struct netbsd32_fbcursor *);
|
||||
static __inline void
|
||||
netbsd32_from_opiocdesc(struct opiocdesc *, struct netbsd32_opiocdesc *);
|
||||
static __inline void
|
||||
netbsd32_from_format_op(struct format_op *, struct netbsd32_format_op *);
|
||||
static __inline void
|
||||
netbsd32_from_ifconf(struct ifconf *, struct netbsd32_ifconf *);
|
||||
static __inline void
|
||||
netbsd32_from_ifmediareq(struct ifmediareq *, struct netbsd32_ifmediareq *);
|
||||
static __inline void
|
||||
netbsd32_from_ifdrv(struct ifdrv *, struct netbsd32_ifdrv *);
|
||||
static __inline void
|
||||
netbsd32_from_sioc_vif_req(struct sioc_vif_req *, struct netbsd32_sioc_vif_req *);
|
||||
static __inline void
|
||||
netbsd32_from_sioc_sg_req(struct sioc_sg_req *, struct netbsd32_sioc_sg_req *);
|
||||
|
||||
/* convert to/from different structures */
|
||||
|
||||
static __inline void
|
||||
netbsd32_to_fbcmap(s32p, p)
|
||||
struct netbsd32_fbcmap *s32p;
|
||||
struct fbcmap *p;
|
||||
|
@ -74,7 +117,7 @@ netbsd32_to_fbcmap(s32p, p)
|
|||
p->blue = (u_char *)(u_long)s32p->blue;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_to_fbcursor(s32p, p)
|
||||
struct netbsd32_fbcursor *s32p;
|
||||
struct fbcursor *p;
|
||||
|
@ -90,7 +133,7 @@ netbsd32_to_fbcursor(s32p, p)
|
|||
p->mask = (char *)(u_long)s32p->mask;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_to_opiocdesc(s32p, p)
|
||||
struct netbsd32_opiocdesc *s32p;
|
||||
struct opiocdesc *p;
|
||||
|
@ -103,7 +146,7 @@ netbsd32_to_opiocdesc(s32p, p)
|
|||
p->op_buf = (char *)(u_long)s32p->op_buf;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_to_partinfo(s32p, p)
|
||||
struct netbsd32_partinfo *s32p;
|
||||
struct partinfo *p;
|
||||
|
@ -113,7 +156,7 @@ netbsd32_to_partinfo(s32p, p)
|
|||
p->part = (struct partition *)(u_long)s32p->part;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_to_format_op(s32p, p)
|
||||
struct netbsd32_format_op *s32p;
|
||||
struct format_op *p;
|
||||
|
@ -126,7 +169,7 @@ netbsd32_to_format_op(s32p, p)
|
|||
}
|
||||
|
||||
#if 0 /* XXX see below */
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_to_ifreq(s32p, p, cmd)
|
||||
struct netbsd32_ifreq *s32p;
|
||||
struct ifreq *p;
|
||||
|
@ -143,7 +186,7 @@ netbsd32_to_ifreq(s32p, p, cmd)
|
|||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_to_ifconf(s32p, p)
|
||||
struct netbsd32_ifconf *s32p;
|
||||
struct ifconf *p;
|
||||
|
@ -154,7 +197,7 @@ netbsd32_to_ifconf(s32p, p)
|
|||
p->ifc_buf = (caddr_t)(u_long)s32p->ifc_buf;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_to_ifmediareq(s32p, p)
|
||||
struct netbsd32_ifmediareq *s32p;
|
||||
struct ifmediareq *p;
|
||||
|
@ -164,7 +207,7 @@ netbsd32_to_ifmediareq(s32p, p)
|
|||
p->ifm_ulist = (int *)(u_long)s32p->ifm_ulist;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_to_ifdrv(s32p, p)
|
||||
struct netbsd32_ifdrv *s32p;
|
||||
struct ifdrv *p;
|
||||
|
@ -174,7 +217,7 @@ netbsd32_to_ifdrv(s32p, p)
|
|||
p->ifd_data = (void *)(u_long)s32p->ifd_data;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_to_sioc_vif_req(s32p, p)
|
||||
struct netbsd32_sioc_vif_req *s32p;
|
||||
struct sioc_vif_req *p;
|
||||
|
@ -187,7 +230,7 @@ netbsd32_to_sioc_vif_req(s32p, p)
|
|||
p->obytes = (u_long)s32p->obytes;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_to_sioc_sg_req(s32p, p)
|
||||
struct netbsd32_sioc_sg_req *s32p;
|
||||
struct sioc_sg_req *p;
|
||||
|
@ -204,7 +247,7 @@ netbsd32_to_sioc_sg_req(s32p, p)
|
|||
* handle ioctl conversions from sparc64 -> netbsd32
|
||||
*/
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_from_fbcmap(p, s32p)
|
||||
struct fbcmap *p;
|
||||
struct netbsd32_fbcmap *s32p;
|
||||
|
@ -220,7 +263,7 @@ netbsd32_from_fbcmap(p, s32p)
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_from_fbcursor(p, s32p)
|
||||
struct fbcursor *p;
|
||||
struct netbsd32_fbcursor *s32p;
|
||||
|
@ -239,7 +282,7 @@ netbsd32_from_fbcursor(p, s32p)
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_from_opiocdesc(p, s32p)
|
||||
struct opiocdesc *p;
|
||||
struct netbsd32_opiocdesc *s32p;
|
||||
|
@ -252,7 +295,7 @@ netbsd32_from_opiocdesc(p, s32p)
|
|||
s32p->op_buf = (netbsd32_charp)(u_long)p->op_buf;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_from_format_op(p, s32p)
|
||||
struct format_op *p;
|
||||
struct netbsd32_format_op *s32p;
|
||||
|
@ -268,7 +311,7 @@ netbsd32_from_format_op(p, s32p)
|
|||
}
|
||||
|
||||
#if 0 /* XXX see below */
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_from_ifreq(p, s32p, cmd)
|
||||
struct ifreq *p;
|
||||
struct netbsd32_ifreq *s32p;
|
||||
|
@ -285,7 +328,7 @@ netbsd32_from_ifreq(p, s32p, cmd)
|
|||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_from_ifconf(p, s32p)
|
||||
struct ifconf *p;
|
||||
struct netbsd32_ifconf *s32p;
|
||||
|
@ -296,7 +339,7 @@ netbsd32_from_ifconf(p, s32p)
|
|||
s32p->ifc_buf = (netbsd32_caddr_t)(u_long)p->ifc_buf;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_from_ifmediareq(p, s32p)
|
||||
struct ifmediareq *p;
|
||||
struct netbsd32_ifmediareq *s32p;
|
||||
|
@ -309,7 +352,7 @@ netbsd32_from_ifmediareq(p, s32p)
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_from_ifdrv(p, s32p)
|
||||
struct ifdrv *p;
|
||||
struct netbsd32_ifdrv *s32p;
|
||||
|
@ -322,7 +365,7 @@ netbsd32_from_ifdrv(p, s32p)
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_from_sioc_vif_req(p, s32p)
|
||||
struct sioc_vif_req *p;
|
||||
struct netbsd32_sioc_vif_req *s32p;
|
||||
|
@ -335,7 +378,7 @@ netbsd32_from_sioc_vif_req(p, s32p)
|
|||
s32p->obytes = (netbsd32_u_long)p->obytes;
|
||||
}
|
||||
|
||||
void
|
||||
static __inline void
|
||||
netbsd32_from_sioc_sg_req(p, s32p)
|
||||
struct sioc_sg_req *p;
|
||||
struct netbsd32_sioc_sg_req *s32p;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_netbsd.c,v 1.31 2000/07/09 03:03:35 mrg Exp $ */
|
||||
/* $NetBSD: netbsd32_netbsd.c,v 1.32 2000/07/09 13:39:31 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Matthew R. Green
|
||||
|
@ -562,11 +562,11 @@ netbsd32_from_semid_ds(dsp, s32dsp)
|
|||
|
||||
/*
|
||||
* below are all the standard NetBSD system calls, in the 32bit
|
||||
* environment, witht he necessary conversions to 64bit before
|
||||
* calling the real syscall.
|
||||
* environment, with the necessary conversions to 64bit before
|
||||
* calling the real syscall, unless we need to inline the whole
|
||||
* syscall here, sigh.
|
||||
*/
|
||||
|
||||
|
||||
int
|
||||
netbsd32_exit(p, v, retval)
|
||||
struct proc *p;
|
||||
|
@ -944,7 +944,7 @@ netbsd32_getfsstat(p, v, retval)
|
|||
long count, maxcount, error;
|
||||
|
||||
maxcount = SCARG(uap, bufsize) / sizeof(struct netbsd32_statfs);
|
||||
sfsp = (caddr_t)SCARG(uap, buf);
|
||||
sfsp = (caddr_t)(u_long)SCARG(uap, buf);
|
||||
simple_lock(&mountlist_slock);
|
||||
count = 0;
|
||||
for (mp = mountlist.cqh_first; mp != (void *)&mountlist; mp = nmp) {
|
||||
|
@ -3540,7 +3540,7 @@ netbsd32_pread(p, v, retval)
|
|||
NETBSD32TO64_UAP(pad);
|
||||
NETBSD32TO64_UAP(offset);
|
||||
error = sys_pread(p, &ua, (register_t *)&rt);
|
||||
*(netbsd32_ssize_t *)retval = rt;
|
||||
*retval = rt;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -3567,7 +3567,7 @@ netbsd32_pwrite(p, v, retval)
|
|||
NETBSD32TO64_UAP(pad);
|
||||
NETBSD32TO64_UAP(offset);
|
||||
error = sys_pwrite(p, &ua, (register_t *)&rt);
|
||||
*(netbsd32_ssize_t *)retval = rt;
|
||||
*retval = rt;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -3659,7 +3659,7 @@ netbsd32_ntp_gettime(p, v, retval)
|
|||
time_status & (STA_PPSWANDER | STA_PPSERROR)))
|
||||
*retval = TIME_ERROR;
|
||||
else
|
||||
*retval = (register_t)time_state;
|
||||
*retval = time_state;
|
||||
}
|
||||
return(error);
|
||||
}
|
||||
|
@ -3752,8 +3752,9 @@ netbsd32_ntp_adjtime(p, v, retval)
|
|||
#endif /* PPS_SYNC */
|
||||
(void)splx(s);
|
||||
|
||||
netbsd32_from_timeval(&ntv, &ntv32);
|
||||
error = copyout((caddr_t)&ntv32, (caddr_t)SCARG(uap, tp), sizeof(ntv32));
|
||||
netbsd32_from_timex(&ntv, &ntv32);
|
||||
error = copyout((caddr_t)&ntv32, (caddr_t)(u_long)SCARG(uap, tp),
|
||||
sizeof(ntv32));
|
||||
if (!error) {
|
||||
|
||||
/*
|
||||
|
@ -3769,7 +3770,7 @@ netbsd32_ntp_adjtime(p, v, retval)
|
|||
time_status & (STA_PPSWANDER | STA_PPSERROR)))
|
||||
*retval = TIME_ERROR;
|
||||
else
|
||||
*retval = (register_t)time_state;
|
||||
*retval = time_state;
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
@ -3911,7 +3912,7 @@ netbsd32_pathconf(p, v, retval)
|
|||
NETBSD32TOP_UAP(path, const char);
|
||||
NETBSD32TO64_UAP(name);
|
||||
error = sys_pathconf(p, &ua, (register_t *)&rt);
|
||||
*(netbsd32_long *)retval = (netbsd32_long)rt;
|
||||
*retval = rt;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -3932,7 +3933,7 @@ netbsd32_fpathconf(p, v, retval)
|
|||
NETBSD32TO64_UAP(fd);
|
||||
NETBSD32TO64_UAP(name);
|
||||
error = sys_fpathconf(p, &ua, (register_t *)&rt);
|
||||
*(netbsd32_long *)retval = (netbsd32_long)rt;
|
||||
*retval = rt;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -4657,7 +4658,7 @@ netbsd32_msgrcv(p, v, retval)
|
|||
NETBSD32TOX_UAP(msgtyp, long);
|
||||
NETBSD32TO64_UAP(msgflg);
|
||||
error = sys_msgrcv(p, &ua, (register_t *)&rt);
|
||||
*(netbsd32_ssize_t *)retval = rt;
|
||||
*retval = rt;
|
||||
return (error);
|
||||
#else
|
||||
return (ENOSYS);
|
||||
|
@ -4687,7 +4688,7 @@ netbsd32_shmat(p, v, retval)
|
|||
NETBSD32TOP_UAP(shmaddr, void);
|
||||
NETBSD32TO64_UAP(shmflg);
|
||||
error = sys_shmat(p, &ua, (register_t *)&rt);
|
||||
*retval = (netbsd32_voidp)(u_long)rt;
|
||||
*retval = rt;
|
||||
return (error);
|
||||
#else
|
||||
return (ENOSYS);
|
||||
|
@ -5340,7 +5341,7 @@ netbsd32_fktrace(p, v, retval)
|
|||
} */ *uap = v;
|
||||
struct sys_fktrace_args ua;
|
||||
|
||||
NETBSD32TOX_UAP(fd, const int);
|
||||
NETBSD32TOX_UAP(fd, int);
|
||||
NETBSD32TO64_UAP(ops);
|
||||
NETBSD32TO64_UAP(facs);
|
||||
NETBSD32TO64_UAP(pid);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.12 2000/01/31 15:59:58 christos Exp $
|
||||
$NetBSD: syscalls.master,v 1.13 2000/07/09 13:39:32 mrg Exp $
|
||||
|
||||
; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
|
||||
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
|
||||
|
@ -286,13 +286,8 @@
|
|||
172 UNIMPL
|
||||
173 STD { netbsd32_ssize_t netbsd32_pread(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); }
|
||||
174 STD { netbsd32_ssize_t netbsd32_pwrite(int fd, const netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); }
|
||||
#if defined(NTP) && !defined(_KERNEL)
|
||||
175 STD { int netbsd32_ntp_gettime(netbsd32_ntptimevalp_t ntvp); }
|
||||
176 STD { int netbsd32_ntp_adjtime(netbsd32_timexp_t tp); }
|
||||
#else
|
||||
175 EXCL netbsd32_ntp_gettime
|
||||
176 EXCL netbsd32_ntp_adjtime
|
||||
#endif
|
||||
177 UNIMPL
|
||||
178 UNIMPL
|
||||
179 UNIMPL
|
||||
|
|
Loading…
Reference in New Issue