- Prototyping changes

- Fix bug that gcc -Wall found in linux_sys_getpgid()
This commit is contained in:
christos 1996-04-04 23:56:01 +00:00
parent 8eeab3102b
commit d7130e8385
16 changed files with 272 additions and 144 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_break.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_break.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_misc.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_misc.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_misc_notalpha.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_misc_notalpha.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_oldmmap.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_oldmmap.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_oldolduname.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_oldolduname.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_oldselect.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_oldselect.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_olduname.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_olduname.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_pipe.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_pipe.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_misc.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_misc.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_break.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_break.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_misc_notalpha.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_misc_notalpha.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_oldmmap.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_oldmmap.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_oldolduname.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_oldolduname.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_oldselect.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_oldselect.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_olduname.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_olduname.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_pipe.c,v 1.25 1996/04/03 09:02:40 mycroft Exp $ */ /* $NetBSD: linux_pipe.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/* /*
* Copyright (c) 1995 Frank van der Linden * Copyright (c) 1995 Frank van der Linden
@ -76,6 +76,12 @@
#include <compat/linux/linux_util.h> #include <compat/linux/linux_util.h>
#include <compat/linux/linux_dirent.h> #include <compat/linux/linux_dirent.h>
/* linux_misc.c */
static void bsd_to_linux_wstat __P((int *));
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
int linux_select1 __P((struct proc *, register_t *, int, fd_set *, fd_set *,
fd_set *, struct timeval *));
/* /*
* The information on a terminated (or stopped) process needs * The information on a terminated (or stopped) process needs
* to be converted in order for Linux binaries to get a valid signal * to be converted in order for Linux binaries to get a valid signal
@ -197,9 +203,11 @@ linux_sys_break(p, v, retval)
void *v; void *v;
register_t *retval; register_t *retval;
{ {
#if 0
struct linux_sys_brk_args /* { struct linux_sys_brk_args /* {
syscallarg(char *) nsize; syscallarg(char *) nsize;
} */ *uap = v; } */ *uap = v;
#endif
return ENOSYS; return ENOSYS;
} }
@ -220,8 +228,7 @@ linux_sys_brk(p, v, retval)
char *nbrk = SCARG(uap, nsize); char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba; struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace; struct vmspace *vm = p->p_vmspace;
int error = 0; caddr_t oldbrk;
caddr_t oldbrk, newbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize); oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/* /*
@ -605,7 +612,7 @@ linux_sys_alarm(p, v, retval)
struct linux_sys_alarm_args /* { struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs; syscallarg(unsigned int) secs;
} */ *uap = v; } */ *uap = v;
int error, s; int s;
struct itimerval *itp, it; struct itimerval *itp, it;
itp = &p->p_realtimer; itp = &p->p_realtimer;
@ -749,10 +756,10 @@ linux_sys_getdents(p, v, retval)
} */ *uap = v; } */ *uap = v;
register struct dirent *bdp; register struct dirent *bdp;
struct vnode *vp; struct vnode *vp;
caddr_t inp, buf; /* BSD-format */ caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */ int len, reclen; /* BSD-format */
caddr_t outp; /* Linux-format */ caddr_t outp; /* Linux-format */
int resid, linux_reclen;/* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp; struct file *fp;
struct uio auio; struct uio auio;
struct iovec aiov; struct iovec aiov;
@ -1028,9 +1035,10 @@ linux_sys_getpgid(p, v, retval)
} */ *uap = v; } */ *uap = v;
struct proc *targp; struct proc *targp;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
if ((targp = pfind(SCARG(uap, pid))) == 0) if ((targp = pfind(SCARG(uap, pid))) == 0)
return ESRCH; return ESRCH;
}
else else
targp = p; targp = p;