diff options
| author | christos <christos@NetBSD.org> | 1996-04-05 00:01:10 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 1996-04-05 00:01:10 +0000 |
| commit | 151fa70f784fa4b83a16c26c345ea8309f370bd4 (patch) | |
| tree | 3e08174c79d8a65fbdf218568ac603e4d4364060 /sys | |
| parent | d7130e8385c2803816dab0e32f6c08c3720de103 (diff) | |
Prototyping changes.
Diffstat (limited to 'sys')
25 files changed, 412 insertions, 83 deletions
diff --git a/sys/compat/linux/arch/i386/linux_ioctl.h b/sys/compat/linux/arch/i386/linux_ioctl.h index f1c8592eaf5..3c8aca786ec 100644 --- a/sys/compat/linux/arch/i386/linux_ioctl.h +++ b/sys/compat/linux/arch/i386/linux_ioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ioctl.h,v 1.3 1996/03/08 04:56:04 mycroft Exp $ */ +/* $NetBSD: linux_ioctl.h,v 1.4 1996/04/05 00:01:36 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -33,3 +33,12 @@ #define _LINUX_IO(x,y) (((x) << 8) | (y)) #define LINUX_IOCGROUP(x) (((x) >> 8) & 0xff) + +struct linux_sys_ioctl_args; +int linux_ioctl_audio __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); +int linux_machdepioctl __P((struct proc *, void *, register_t *)); +int linux_ioctl_termios __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); +int linux_ioctl_socket __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); diff --git a/sys/compat/linux/common/linux_exec.c b/sys/compat/linux/common/linux_exec.c index cc266db42bd..ab234088050 100644 --- a/sys/compat/linux/common/linux_exec.c +++ b/sys/compat/linux/common/linux_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec.c,v 1.12 1995/10/07 06:27:00 mycroft Exp $ */ +/* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -37,9 +37,12 @@ #include <sys/malloc.h> #include <sys/namei.h> #include <sys/vnode.h> +#include <sys/mount.h> #include <sys/exec_elf.h> #include <sys/mman.h> +#include <sys/syscallargs.h> + #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/vm_map.h> @@ -69,6 +72,11 @@ extern char linux_sigcode[], linux_esigcode[]; extern struct sysent linux_sysent[]; extern char *linux_syscallnames[]; +int exec_linux_aout_prep_zmagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_nmagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_omagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_qmagic __P((struct proc *, struct exec_package *)); + struct emul emul_linux_aout = { "linux", linux_error, diff --git a/sys/compat/linux/common/linux_exec_aout.c b/sys/compat/linux/common/linux_exec_aout.c index b94a7975af8..c3fc9597c74 100644 --- a/sys/compat/linux/common/linux_exec_aout.c +++ b/sys/compat/linux/common/linux_exec_aout.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_aout.c,v 1.12 1995/10/07 06:27:00 mycroft Exp $ */ +/* $NetBSD: linux_exec_aout.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -37,9 +37,12 @@ #include <sys/malloc.h> #include <sys/namei.h> #include <sys/vnode.h> +#include <sys/mount.h> #include <sys/exec_elf.h> #include <sys/mman.h> +#include <sys/syscallargs.h> + #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/vm_map.h> @@ -69,6 +72,11 @@ extern char linux_sigcode[], linux_esigcode[]; extern struct sysent linux_sysent[]; extern char *linux_syscallnames[]; +int exec_linux_aout_prep_zmagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_nmagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_omagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_qmagic __P((struct proc *, struct exec_package *)); + struct emul emul_linux_aout = { "linux", linux_error, diff --git a/sys/compat/linux/common/linux_exec_elf32.c b/sys/compat/linux/common/linux_exec_elf32.c index 1a2f8f11a55..05619c9023f 100644 --- a/sys/compat/linux/common/linux_exec_elf32.c +++ b/sys/compat/linux/common/linux_exec_elf32.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_elf32.c,v 1.12 1995/10/07 06:27:00 mycroft Exp $ */ +/* $NetBSD: linux_exec_elf32.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -37,9 +37,12 @@ #include <sys/malloc.h> #include <sys/namei.h> #include <sys/vnode.h> +#include <sys/mount.h> #include <sys/exec_elf.h> #include <sys/mman.h> +#include <sys/syscallargs.h> + #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/vm_map.h> @@ -69,6 +72,11 @@ extern char linux_sigcode[], linux_esigcode[]; extern struct sysent linux_sysent[]; extern char *linux_syscallnames[]; +int exec_linux_aout_prep_zmagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_nmagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_omagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_qmagic __P((struct proc *, struct exec_package *)); + struct emul emul_linux_aout = { "linux", linux_error, diff --git a/sys/compat/linux/common/linux_file.c b/sys/compat/linux/common/linux_file.c index c05a89916f2..268c0f60ac7 100644 --- a/sys/compat/linux/common/linux_file.c +++ b/sys/compat/linux/common/linux_file.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_file.c,v 1.13 1995/10/08 22:53:43 fvdl Exp $ */ +/* $NetBSD: linux_file.c,v 1.14 1996/04/05 00:01:21 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -54,6 +54,15 @@ #include <compat/linux/linux_fcntl.h> #include <compat/linux/linux_util.h> +#include <machine/linux_machdep.h> + +static int linux_to_bsd_ioflags __P((int)); +static int bsd_to_linux_ioflags __P((int)); +static void bsd_to_linux_flock __P((struct flock *, struct linux_flock *)); +static void linux_to_bsd_flock __P((struct linux_flock *, struct flock *)); +static void bsd_to_linux_stat __P((struct stat *, struct linux_stat *)); +static int linux_stat1 __P((struct proc *, void *, register_t *, int)); + /* * Some file-related calls are handled here. The usual flag conversion * an structure conversion is done, and alternate emul path searching. @@ -64,7 +73,8 @@ * of the flags used in open(2) and fcntl(2). */ static int -linux_to_bsd_ioflags(int lflags) +linux_to_bsd_ioflags(lflags) + int lflags; { int res = 0; @@ -84,7 +94,8 @@ linux_to_bsd_ioflags(int lflags) } static int -bsd_to_linux_ioflags(int bflags) +bsd_to_linux_ioflags(bflags) + int bflags; { int res = 0; @@ -483,9 +494,9 @@ linux_sys_fstat(p, v, retval) } static int -linux_stat1(p, uap, retval, dolstat) +linux_stat1(p, v, retval, dolstat) struct proc *p; - struct linux_sys_stat_args *uap; + void *v; register_t *retval; int dolstat; { @@ -494,6 +505,7 @@ linux_stat1(p, uap, retval, dolstat) struct stat *st, tmpst; caddr_t sg; int error; + struct linux_sys_stat_args *uap = v; sg = stackgap_init(p->p_emul); diff --git a/sys/compat/linux/common/linux_ioctl.c b/sys/compat/linux/common/linux_ioctl.c index 4d6ab75d3b3..4d237420ebb 100644 --- a/sys/compat/linux/common/linux_ioctl.c +++ b/sys/compat/linux/common/linux_ioctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ioctl.c,v 1.13 1996/03/08 04:56:03 mycroft Exp $ */ +/* $NetBSD: linux_ioctl.c,v 1.14 1996/04/05 00:01:28 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -44,9 +44,9 @@ #include <sys/syscallargs.h> #include <compat/linux/linux_types.h> -#include <compat/linux/linux_ioctl.h> #include <compat/linux/linux_signal.h> #include <compat/linux/linux_syscallargs.h> +#include <compat/linux/linux_ioctl.h> /* * Most ioctl command are just converted to their NetBSD values, diff --git a/sys/compat/linux/common/linux_ioctl.h b/sys/compat/linux/common/linux_ioctl.h index f1c8592eaf5..3c8aca786ec 100644 --- a/sys/compat/linux/common/linux_ioctl.h +++ b/sys/compat/linux/common/linux_ioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ioctl.h,v 1.3 1996/03/08 04:56:04 mycroft Exp $ */ +/* $NetBSD: linux_ioctl.h,v 1.4 1996/04/05 00:01:36 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -33,3 +33,12 @@ #define _LINUX_IO(x,y) (((x) << 8) | (y)) #define LINUX_IOCGROUP(x) (((x) >> 8) & 0xff) + +struct linux_sys_ioctl_args; +int linux_ioctl_audio __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); +int linux_machdepioctl __P((struct proc *, void *, register_t *)); +int linux_ioctl_termios __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); +int linux_ioctl_socket __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); diff --git a/sys/compat/linux/common/linux_ipc.c b/sys/compat/linux/common/linux_ipc.c index 407a075eb7e..5d3bd79d529 100644 --- a/sys/compat/linux/common/linux_ipc.c +++ b/sys/compat/linux/common/linux_ipc.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ipc.c,v 1.9 1995/10/08 22:49:29 fvdl Exp $ */ +/* $NetBSD: linux_ipc.c,v 1.10 1996/04/05 00:01:44 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -75,6 +75,10 @@ static int linux_semget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_semctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void bsd_to_linux_semid_ds __P((struct semid_ds *, + struct linux_semid_ds *)); +static void linux_to_bsd_semid_ds __P((struct linux_semid_ds *, + struct semid_ds *)); #endif #ifdef SYSVMSG @@ -82,10 +86,14 @@ static int linux_msgsnd __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_msgrcv __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); -static int linux_msgop __P((struct proc *, struct linux_sys_ipc_args *, +static int linux_msgget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_msgctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void linux_to_bsd_msqid_ds __P((struct linux_msqid_ds *, + struct msqid_ds *)); +static void bsd_to_linux_msqid_ds __P((struct msqid_ds *, + struct linux_msqid_ds *)); #endif #ifdef SYSVSHM @@ -97,9 +105,18 @@ static int linux_shmget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_shmctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void linux_to_bsd_shmid_ds __P((struct linux_shmid_ds *, + struct shmid_ds *)); +static void bsd_to_linux_shmid_ds __P((struct shmid_ds *, + struct linux_shmid_ds *)); #endif +static void linux_to_bsd_ipc_perm __P((struct linux_ipc_perm *, + struct ipc_perm *)); +static void bsd_to_linux_ipc_perm __P((struct ipc_perm *, + struct linux_ipc_perm *)); + int linux_sys_ipc(p, v, retval) struct proc *p; @@ -113,7 +130,6 @@ linux_sys_ipc(p, v, retval) syscallarg(int) a3; syscallarg(caddr_t) ptr; } */ *uap = v; - int what, error; switch (SCARG(uap, what)) { #ifdef SYSVSEM @@ -386,7 +402,7 @@ bsd_to_linux_msqid_ds(bmp, lmp) lmp->l_msg_ctime = bmp->msg_ctime; } -int +static int linux_msgsnd(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -408,7 +424,7 @@ linux_msgsnd(p, uap, retval) return sys_msgsnd(p, &bma, retval); } -int +static int linux_msgrcv(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -436,7 +452,7 @@ linux_msgrcv(p, uap, retval) return sys_msgrcv(p, &bma, retval); } -int +static int linux_msgget(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -456,7 +472,7 @@ linux_msgget(p, uap, retval) return sys_msgget(p, &bma, retval); } -int +static int linux_msgctl(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -510,7 +526,7 @@ linux_msgctl(p, uap, retval) * in which the return value is to be passed. This is subsequently * handled by libc, apparently. */ -int +static int linux_shmat(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -544,7 +560,7 @@ linux_shmat(p, uap, retval) * shmdt(): this could have been mapped directly, if it wasn't for * the extra indirection by the linux_ipc system call. */ -int +static int linux_shmdt(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -566,7 +582,7 @@ linux_shmdt(p, uap, retval) /* * Same story as shmdt. */ -int +static int linux_shmget(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -636,7 +652,7 @@ bsd_to_linux_shmid_ds(bsp, lsp) * * The usual structure conversion and massaging is done. */ -int +static int linux_shmctl(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { diff --git a/sys/compat/linux/common/linux_ipccall.c b/sys/compat/linux/common/linux_ipccall.c index ab48869b85c..2f5cb016be7 100644 --- a/sys/compat/linux/common/linux_ipccall.c +++ b/sys/compat/linux/common/linux_ipccall.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ipccall.c,v 1.9 1995/10/08 22:49:29 fvdl Exp $ */ +/* $NetBSD: linux_ipccall.c,v 1.10 1996/04/05 00:01:44 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -75,6 +75,10 @@ static int linux_semget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_semctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void bsd_to_linux_semid_ds __P((struct semid_ds *, + struct linux_semid_ds *)); +static void linux_to_bsd_semid_ds __P((struct linux_semid_ds *, + struct semid_ds *)); #endif #ifdef SYSVMSG @@ -82,10 +86,14 @@ static int linux_msgsnd __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_msgrcv __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); -static int linux_msgop __P((struct proc *, struct linux_sys_ipc_args *, +static int linux_msgget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_msgctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void linux_to_bsd_msqid_ds __P((struct linux_msqid_ds *, + struct msqid_ds *)); +static void bsd_to_linux_msqid_ds __P((struct msqid_ds *, + struct linux_msqid_ds *)); #endif #ifdef SYSVSHM @@ -97,9 +105,18 @@ static int linux_shmget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_shmctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void linux_to_bsd_shmid_ds __P((struct linux_shmid_ds *, + struct shmid_ds *)); +static void bsd_to_linux_shmid_ds __P((struct shmid_ds *, + struct linux_shmid_ds *)); #endif +static void linux_to_bsd_ipc_perm __P((struct linux_ipc_perm *, + struct ipc_perm *)); +static void bsd_to_linux_ipc_perm __P((struct ipc_perm *, + struct linux_ipc_perm *)); + int linux_sys_ipc(p, v, retval) struct proc *p; @@ -113,7 +130,6 @@ linux_sys_ipc(p, v, retval) syscallarg(int) a3; syscallarg(caddr_t) ptr; } */ *uap = v; - int what, error; switch (SCARG(uap, what)) { #ifdef SYSVSEM @@ -386,7 +402,7 @@ bsd_to_linux_msqid_ds(bmp, lmp) lmp->l_msg_ctime = bmp->msg_ctime; } -int +static int linux_msgsnd(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -408,7 +424,7 @@ linux_msgsnd(p, uap, retval) return sys_msgsnd(p, &bma, retval); } -int +static int linux_msgrcv(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -436,7 +452,7 @@ linux_msgrcv(p, uap, retval) return sys_msgrcv(p, &bma, retval); } -int +static int linux_msgget(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -456,7 +472,7 @@ linux_msgget(p, uap, retval) return sys_msgget(p, &bma, retval); } -int +static int linux_msgctl(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -510,7 +526,7 @@ linux_msgctl(p, uap, retval) * in which the return value is to be passed. This is subsequently * handled by libc, apparently. */ -int +static int linux_shmat(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -544,7 +560,7 @@ linux_shmat(p, uap, retval) * shmdt(): this could have been mapped directly, if it wasn't for * the extra indirection by the linux_ipc system call. */ -int +static int linux_shmdt(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -566,7 +582,7 @@ linux_shmdt(p, uap, retval) /* * Same story as shmdt. */ -int +static int linux_shmget(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -636,7 +652,7 @@ bsd_to_linux_shmid_ds(bsp, lsp) * * The usual structure conversion and massaging is done. */ -int +static int linux_shmctl(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { diff --git a/sys/compat/linux/common/linux_llseek.c b/sys/compat/linux/common/linux_llseek.c index bde08cb6799..37f96a638f9 100644 --- a/sys/compat/linux/common/linux_llseek.c +++ b/sys/compat/linux/common/linux_llseek.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_llseek.c,v 1.13 1995/10/08 22:53:43 fvdl Exp $ */ +/* $NetBSD: linux_llseek.c,v 1.14 1996/04/05 00:01:21 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -54,6 +54,15 @@ #include <compat/linux/linux_fcntl.h> #include <compat/linux/linux_util.h> +#include <machine/linux_machdep.h> + +static int linux_to_bsd_ioflags __P((int)); +static int bsd_to_linux_ioflags __P((int)); +static void bsd_to_linux_flock __P((struct flock *, struct linux_flock *)); +static void linux_to_bsd_flock __P((struct linux_flock *, struct flock *)); +static void bsd_to_linux_stat __P((struct stat *, struct linux_stat *)); +static int linux_stat1 __P((struct proc *, void *, register_t *, int)); + /* * Some file-related calls are handled here. The usual flag conversion * an structure conversion is done, and alternate emul path searching. @@ -64,7 +73,8 @@ * of the flags used in open(2) and fcntl(2). */ static int -linux_to_bsd_ioflags(int lflags) +linux_to_bsd_ioflags(lflags) + int lflags; { int res = 0; @@ -84,7 +94,8 @@ linux_to_bsd_ioflags(int lflags) } static int -bsd_to_linux_ioflags(int bflags) +bsd_to_linux_ioflags(bflags) + int bflags; { int res = 0; @@ -483,9 +494,9 @@ linux_sys_fstat(p, v, retval) } static int -linux_stat1(p, uap, retval, dolstat) +linux_stat1(p, v, retval, dolstat) struct proc *p; - struct linux_sys_stat_args *uap; + void *v; register_t *retval; int dolstat; { @@ -494,6 +505,7 @@ linux_stat1(p, uap, retval, dolstat) struct stat *st, tmpst; caddr_t sg; int error; + struct linux_sys_stat_args *uap = v; sg = stackgap_init(p->p_emul); diff --git a/sys/compat/linux/common/linux_socket.c b/sys/compat/linux/common/linux_socket.c index 911095aae77..747cf8a7cfd 100644 --- a/sys/compat/linux/common/linux_socket.c +++ b/sys/compat/linux/common/linux_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.13 1996/03/08 04:56:05 mycroft Exp $ */ +/* $NetBSD: linux_socket.c,v 1.14 1996/04/05 00:01:50 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -71,6 +71,36 @@ * are copied to structures. */ +int linux_to_bsd_domain __P((int)); +int linux_socket __P((struct proc *, struct linux_socket_args *, register_t *)); +int linux_bind __P((struct proc *, struct linux_bind_args *, register_t *)); +int linux_connect __P((struct proc *, struct linux_connect_args *, + register_t *)); +int linux_listen __P((struct proc *, struct linux_listen_args *, register_t *)); +int linux_accept __P((struct proc *, struct linux_accept_args *, register_t *)); +int linux_getsockname __P((struct proc *, struct linux_getsockname_args *, + register_t *)); +int linux_getpeername __P((struct proc *, struct linux_getpeername_args *, + register_t *)); +int linux_socketpair __P((struct proc *, struct linux_socketpair_args *, + register_t *)); +int linux_send __P((struct proc *, struct linux_send_args *, register_t *)); +int linux_recv __P((struct proc *, struct linux_recv_args *, register_t *)); +int linux_sendto __P((struct proc *, struct linux_sendto_args *, register_t *)); +int linux_recvfrom __P((struct proc *, struct linux_recvfrom_args *, + register_t *)); +int linux_shutdown __P((struct proc *, struct linux_shutdown_args *, + register_t *)); +int linux_to_bsd_sopt_level __P((int)); +int linux_to_bsd_so_sockopt __P((int)); +int linux_to_bsd_ip_sockopt __P((int)); +int linux_to_bsd_tcp_sockopt __P((int)); +int linux_to_bsd_udp_sockopt __P((int)); +int linux_setsockopt __P((struct proc *, struct linux_setsockopt_args *, + register_t *)); +int linux_getsockopt __P((struct proc *, struct linux_getsockopt_args *, + register_t *)); + /* * Convert between Linux and BSD socket domain values */ diff --git a/sys/compat/linux/common/linux_socketcall.c b/sys/compat/linux/common/linux_socketcall.c index 750ea1183cf..04c409cd167 100644 --- a/sys/compat/linux/common/linux_socketcall.c +++ b/sys/compat/linux/common/linux_socketcall.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socketcall.c,v 1.13 1996/03/08 04:56:05 mycroft Exp $ */ +/* $NetBSD: linux_socketcall.c,v 1.14 1996/04/05 00:01:50 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -71,6 +71,36 @@ * are copied to structures. */ +int linux_to_bsd_domain __P((int)); +int linux_socket __P((struct proc *, struct linux_socket_args *, register_t *)); +int linux_bind __P((struct proc *, struct linux_bind_args *, register_t *)); +int linux_connect __P((struct proc *, struct linux_connect_args *, + register_t *)); +int linux_listen __P((struct proc *, struct linux_listen_args *, register_t *)); +int linux_accept __P((struct proc *, struct linux_accept_args *, register_t *)); +int linux_getsockname __P((struct proc *, struct linux_getsockname_args *, + register_t *)); +int linux_getpeername __P((struct proc *, struct linux_getpeername_args *, + register_t *)); +int linux_socketpair __P((struct proc *, struct linux_socketpair_args *, + register_t *)); +int linux_send __P((struct proc *, struct linux_send_args *, register_t *)); +int linux_recv __P((struct proc *, struct linux_recv_args *, register_t *)); +int linux_sendto __P((struct proc *, struct linux_sendto_args *, register_t *)); +int linux_recvfrom __P((struct proc *, struct linux_recvfrom_args *, + register_t *)); +int linux_shutdown __P((struct proc *, struct linux_shutdown_args *, + register_t *)); +int linux_to_bsd_sopt_level __P((int)); +int linux_to_bsd_so_sockopt __P((int)); +int linux_to_bsd_ip_sockopt __P((int)); +int linux_to_bsd_tcp_sockopt __P((int)); +int linux_to_bsd_udp_sockopt __P((int)); +int linux_setsockopt __P((struct proc *, struct linux_setsockopt_args *, + register_t *)); +int linux_getsockopt __P((struct proc *, struct linux_getsockopt_args *, + register_t *)); + /* * Convert between Linux and BSD socket domain values */ diff --git a/sys/compat/linux/common/linux_termios.c b/sys/compat/linux/common/linux_termios.c index 3da82496e7b..f15ef9ec45e 100644 --- a/sys/compat/linux/common/linux_termios.c +++ b/sys/compat/linux/common/linux_termios.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_termios.c,v 1.2 1996/04/03 09:05:35 mycroft Exp $ */ +/* $NetBSD: linux_termios.c,v 1.3 1996/04/05 00:01:54 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -61,6 +61,16 @@ static int linux_spmasks[] = { LINUX_B57600, LINUX_B115200, LINUX_B230400 }; + +static void linux_termio_to_bsd_termios __P((struct linux_termio *, + struct termios *)); +static void bsd_termios_to_linux_termio __P((struct termios *, + struct linux_termio *)); +static void linux_termios_to_bsd_termios __P((struct linux_termios *, + struct termios *)); +static void bsd_termios_to_linux_termios __P((struct termios *, + struct linux_termios *)); + /* * Deal with termio ioctl cruft. This doesn't look very good.. * XXX too much code duplication, obviously.. diff --git a/sys/compat/linux/i386/linux_ioctl.h b/sys/compat/linux/i386/linux_ioctl.h index f1c8592eaf5..3c8aca786ec 100644 --- a/sys/compat/linux/i386/linux_ioctl.h +++ b/sys/compat/linux/i386/linux_ioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ioctl.h,v 1.3 1996/03/08 04:56:04 mycroft Exp $ */ +/* $NetBSD: linux_ioctl.h,v 1.4 1996/04/05 00:01:36 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -33,3 +33,12 @@ #define _LINUX_IO(x,y) (((x) << 8) | (y)) #define LINUX_IOCGROUP(x) (((x) >> 8) & 0xff) + +struct linux_sys_ioctl_args; +int linux_ioctl_audio __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); +int linux_machdepioctl __P((struct proc *, void *, register_t *)); +int linux_ioctl_termios __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); +int linux_ioctl_socket __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); diff --git a/sys/compat/linux/include/linux_ioctl.h b/sys/compat/linux/include/linux_ioctl.h index f1c8592eaf5..3c8aca786ec 100644 --- a/sys/compat/linux/include/linux_ioctl.h +++ b/sys/compat/linux/include/linux_ioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ioctl.h,v 1.3 1996/03/08 04:56:04 mycroft Exp $ */ +/* $NetBSD: linux_ioctl.h,v 1.4 1996/04/05 00:01:36 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -33,3 +33,12 @@ #define _LINUX_IO(x,y) (((x) << 8) | (y)) #define LINUX_IOCGROUP(x) (((x) >> 8) & 0xff) + +struct linux_sys_ioctl_args; +int linux_ioctl_audio __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); +int linux_machdepioctl __P((struct proc *, void *, register_t *)); +int linux_ioctl_termios __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); +int linux_ioctl_socket __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); diff --git a/sys/compat/linux/linux_exec.c b/sys/compat/linux/linux_exec.c index cc266db42bd..ab234088050 100644 --- a/sys/compat/linux/linux_exec.c +++ b/sys/compat/linux/linux_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec.c,v 1.12 1995/10/07 06:27:00 mycroft Exp $ */ +/* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -37,9 +37,12 @@ #include <sys/malloc.h> #include <sys/namei.h> #include <sys/vnode.h> +#include <sys/mount.h> #include <sys/exec_elf.h> #include <sys/mman.h> +#include <sys/syscallargs.h> + #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/vm_map.h> @@ -69,6 +72,11 @@ extern char linux_sigcode[], linux_esigcode[]; extern struct sysent linux_sysent[]; extern char *linux_syscallnames[]; +int exec_linux_aout_prep_zmagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_nmagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_omagic __P((struct proc *, struct exec_package *)); +int exec_linux_aout_prep_qmagic __P((struct proc *, struct exec_package *)); + struct emul emul_linux_aout = { "linux", linux_error, diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index c05a89916f2..268c0f60ac7 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_file.c,v 1.13 1995/10/08 22:53:43 fvdl Exp $ */ +/* $NetBSD: linux_file.c,v 1.14 1996/04/05 00:01:21 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -54,6 +54,15 @@ #include <compat/linux/linux_fcntl.h> #include <compat/linux/linux_util.h> +#include <machine/linux_machdep.h> + +static int linux_to_bsd_ioflags __P((int)); +static int bsd_to_linux_ioflags __P((int)); +static void bsd_to_linux_flock __P((struct flock *, struct linux_flock *)); +static void linux_to_bsd_flock __P((struct linux_flock *, struct flock *)); +static void bsd_to_linux_stat __P((struct stat *, struct linux_stat *)); +static int linux_stat1 __P((struct proc *, void *, register_t *, int)); + /* * Some file-related calls are handled here. The usual flag conversion * an structure conversion is done, and alternate emul path searching. @@ -64,7 +73,8 @@ * of the flags used in open(2) and fcntl(2). */ static int -linux_to_bsd_ioflags(int lflags) +linux_to_bsd_ioflags(lflags) + int lflags; { int res = 0; @@ -84,7 +94,8 @@ linux_to_bsd_ioflags(int lflags) } static int -bsd_to_linux_ioflags(int bflags) +bsd_to_linux_ioflags(bflags) + int bflags; { int res = 0; @@ -483,9 +494,9 @@ linux_sys_fstat(p, v, retval) } static int -linux_stat1(p, uap, retval, dolstat) +linux_stat1(p, v, retval, dolstat) struct proc *p; - struct linux_sys_stat_args *uap; + void *v; register_t *retval; int dolstat; { @@ -494,6 +505,7 @@ linux_stat1(p, uap, retval, dolstat) struct stat *st, tmpst; caddr_t sg; int error; + struct linux_sys_stat_args *uap = v; sg = stackgap_init(p->p_emul); diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 4d6ab75d3b3..4d237420ebb 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ioctl.c,v 1.13 1996/03/08 04:56:03 mycroft Exp $ */ +/* $NetBSD: linux_ioctl.c,v 1.14 1996/04/05 00:01:28 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -44,9 +44,9 @@ #include <sys/syscallargs.h> #include <compat/linux/linux_types.h> -#include <compat/linux/linux_ioctl.h> #include <compat/linux/linux_signal.h> #include <compat/linux/linux_syscallargs.h> +#include <compat/linux/linux_ioctl.h> /* * Most ioctl command are just converted to their NetBSD values, diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h index f1c8592eaf5..3c8aca786ec 100644 --- a/sys/compat/linux/linux_ioctl.h +++ b/sys/compat/linux/linux_ioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ioctl.h,v 1.3 1996/03/08 04:56:04 mycroft Exp $ */ +/* $NetBSD: linux_ioctl.h,v 1.4 1996/04/05 00:01:36 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -33,3 +33,12 @@ #define _LINUX_IO(x,y) (((x) << 8) | (y)) #define LINUX_IOCGROUP(x) (((x) >> 8) & 0xff) + +struct linux_sys_ioctl_args; +int linux_ioctl_audio __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); +int linux_machdepioctl __P((struct proc *, void *, register_t *)); +int linux_ioctl_termios __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); +int linux_ioctl_socket __P((struct proc *, struct linux_sys_ioctl_args *, + register_t *)); diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c index 407a075eb7e..5d3bd79d529 100644 --- a/sys/compat/linux/linux_ipc.c +++ b/sys/compat/linux/linux_ipc.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ipc.c,v 1.9 1995/10/08 22:49:29 fvdl Exp $ */ +/* $NetBSD: linux_ipc.c,v 1.10 1996/04/05 00:01:44 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -75,6 +75,10 @@ static int linux_semget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_semctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void bsd_to_linux_semid_ds __P((struct semid_ds *, + struct linux_semid_ds *)); +static void linux_to_bsd_semid_ds __P((struct linux_semid_ds *, + struct semid_ds *)); #endif #ifdef SYSVMSG @@ -82,10 +86,14 @@ static int linux_msgsnd __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_msgrcv __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); -static int linux_msgop __P((struct proc *, struct linux_sys_ipc_args *, +static int linux_msgget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_msgctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void linux_to_bsd_msqid_ds __P((struct linux_msqid_ds *, + struct msqid_ds *)); +static void bsd_to_linux_msqid_ds __P((struct msqid_ds *, + struct linux_msqid_ds *)); #endif #ifdef SYSVSHM @@ -97,9 +105,18 @@ static int linux_shmget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_shmctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void linux_to_bsd_shmid_ds __P((struct linux_shmid_ds *, + struct shmid_ds *)); +static void bsd_to_linux_shmid_ds __P((struct shmid_ds *, + struct linux_shmid_ds *)); #endif +static void linux_to_bsd_ipc_perm __P((struct linux_ipc_perm *, + struct ipc_perm *)); +static void bsd_to_linux_ipc_perm __P((struct ipc_perm *, + struct linux_ipc_perm *)); + int linux_sys_ipc(p, v, retval) struct proc *p; @@ -113,7 +130,6 @@ linux_sys_ipc(p, v, retval) syscallarg(int) a3; syscallarg(caddr_t) ptr; } */ *uap = v; - int what, error; switch (SCARG(uap, what)) { #ifdef SYSVSEM @@ -386,7 +402,7 @@ bsd_to_linux_msqid_ds(bmp, lmp) lmp->l_msg_ctime = bmp->msg_ctime; } -int +static int linux_msgsnd(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -408,7 +424,7 @@ linux_msgsnd(p, uap, retval) return sys_msgsnd(p, &bma, retval); } -int +static int linux_msgrcv(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -436,7 +452,7 @@ linux_msgrcv(p, uap, retval) return sys_msgrcv(p, &bma, retval); } -int +static int linux_msgget(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -456,7 +472,7 @@ linux_msgget(p, uap, retval) return sys_msgget(p, &bma, retval); } -int +static int linux_msgctl(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -510,7 +526,7 @@ linux_msgctl(p, uap, retval) * in which the return value is to be passed. This is subsequently * handled by libc, apparently. */ -int +static int linux_shmat(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -544,7 +560,7 @@ linux_shmat(p, uap, retval) * shmdt(): this could have been mapped directly, if it wasn't for * the extra indirection by the linux_ipc system call. */ -int +static int linux_shmdt(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -566,7 +582,7 @@ linux_shmdt(p, uap, retval) /* * Same story as shmdt. */ -int +static int linux_shmget(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -636,7 +652,7 @@ bsd_to_linux_shmid_ds(bsp, lsp) * * The usual structure conversion and massaging is done. */ -int +static int linux_shmctl(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 911095aae77..747cf8a7cfd 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.13 1996/03/08 04:56:05 mycroft Exp $ */ +/* $NetBSD: linux_socket.c,v 1.14 1996/04/05 00:01:50 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -71,6 +71,36 @@ * are copied to structures. */ +int linux_to_bsd_domain __P((int)); +int linux_socket __P((struct proc *, struct linux_socket_args *, register_t *)); +int linux_bind __P((struct proc *, struct linux_bind_args *, register_t *)); +int linux_connect __P((struct proc *, struct linux_connect_args *, + register_t *)); +int linux_listen __P((struct proc *, struct linux_listen_args *, register_t *)); +int linux_accept __P((struct proc *, struct linux_accept_args *, register_t *)); +int linux_getsockname __P((struct proc *, struct linux_getsockname_args *, + register_t *)); +int linux_getpeername __P((struct proc *, struct linux_getpeername_args *, + register_t *)); +int linux_socketpair __P((struct proc *, struct linux_socketpair_args *, + register_t *)); +int linux_send __P((struct proc *, struct linux_send_args *, register_t *)); +int linux_recv __P((struct proc *, struct linux_recv_args *, register_t *)); +int linux_sendto __P((struct proc *, struct linux_sendto_args *, register_t *)); +int linux_recvfrom __P((struct proc *, struct linux_recvfrom_args *, + register_t *)); +int linux_shutdown __P((struct proc *, struct linux_shutdown_args *, + register_t *)); +int linux_to_bsd_sopt_level __P((int)); +int linux_to_bsd_so_sockopt __P((int)); +int linux_to_bsd_ip_sockopt __P((int)); +int linux_to_bsd_tcp_sockopt __P((int)); +int linux_to_bsd_udp_sockopt __P((int)); +int linux_setsockopt __P((struct proc *, struct linux_setsockopt_args *, + register_t *)); +int linux_getsockopt __P((struct proc *, struct linux_getsockopt_args *, + register_t *)); + /* * Convert between Linux and BSD socket domain values */ diff --git a/sys/compat/linux/linux_termios.c b/sys/compat/linux/linux_termios.c index 3da82496e7b..f15ef9ec45e 100644 --- a/sys/compat/linux/linux_termios.c +++ b/sys/compat/linux/linux_termios.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_termios.c,v 1.2 1996/04/03 09:05:35 mycroft Exp $ */ +/* $NetBSD: linux_termios.c,v 1.3 1996/04/05 00:01:54 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -61,6 +61,16 @@ static int linux_spmasks[] = { LINUX_B57600, LINUX_B115200, LINUX_B230400 }; + +static void linux_termio_to_bsd_termios __P((struct linux_termio *, + struct termios *)); +static void bsd_termios_to_linux_termio __P((struct termios *, + struct linux_termio *)); +static void linux_termios_to_bsd_termios __P((struct linux_termios *, + struct termios *)); +static void bsd_termios_to_linux_termios __P((struct termios *, + struct linux_termios *)); + /* * Deal with termio ioctl cruft. This doesn't look very good.. * XXX too much code duplication, obviously.. diff --git a/sys/compat/linux/multiarch/linux_ipccall.c b/sys/compat/linux/multiarch/linux_ipccall.c index ab48869b85c..2f5cb016be7 100644 --- a/sys/compat/linux/multiarch/linux_ipccall.c +++ b/sys/compat/linux/multiarch/linux_ipccall.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ipccall.c,v 1.9 1995/10/08 22:49:29 fvdl Exp $ */ +/* $NetBSD: linux_ipccall.c,v 1.10 1996/04/05 00:01:44 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -75,6 +75,10 @@ static int linux_semget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_semctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void bsd_to_linux_semid_ds __P((struct semid_ds *, + struct linux_semid_ds *)); +static void linux_to_bsd_semid_ds __P((struct linux_semid_ds *, + struct semid_ds *)); #endif #ifdef SYSVMSG @@ -82,10 +86,14 @@ static int linux_msgsnd __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_msgrcv __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); -static int linux_msgop __P((struct proc *, struct linux_sys_ipc_args *, +static int linux_msgget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_msgctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void linux_to_bsd_msqid_ds __P((struct linux_msqid_ds *, + struct msqid_ds *)); +static void bsd_to_linux_msqid_ds __P((struct msqid_ds *, + struct linux_msqid_ds *)); #endif #ifdef SYSVSHM @@ -97,9 +105,18 @@ static int linux_shmget __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); static int linux_shmctl __P((struct proc *, struct linux_sys_ipc_args *, register_t *)); +static void linux_to_bsd_shmid_ds __P((struct linux_shmid_ds *, + struct shmid_ds *)); +static void bsd_to_linux_shmid_ds __P((struct shmid_ds *, + struct linux_shmid_ds *)); #endif +static void linux_to_bsd_ipc_perm __P((struct linux_ipc_perm *, + struct ipc_perm *)); +static void bsd_to_linux_ipc_perm __P((struct ipc_perm *, + struct linux_ipc_perm *)); + int linux_sys_ipc(p, v, retval) struct proc *p; @@ -113,7 +130,6 @@ linux_sys_ipc(p, v, retval) syscallarg(int) a3; syscallarg(caddr_t) ptr; } */ *uap = v; - int what, error; switch (SCARG(uap, what)) { #ifdef SYSVSEM @@ -386,7 +402,7 @@ bsd_to_linux_msqid_ds(bmp, lmp) lmp->l_msg_ctime = bmp->msg_ctime; } -int +static int linux_msgsnd(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -408,7 +424,7 @@ linux_msgsnd(p, uap, retval) return sys_msgsnd(p, &bma, retval); } -int +static int linux_msgrcv(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -436,7 +452,7 @@ linux_msgrcv(p, uap, retval) return sys_msgrcv(p, &bma, retval); } -int +static int linux_msgget(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -456,7 +472,7 @@ linux_msgget(p, uap, retval) return sys_msgget(p, &bma, retval); } -int +static int linux_msgctl(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -510,7 +526,7 @@ linux_msgctl(p, uap, retval) * in which the return value is to be passed. This is subsequently * handled by libc, apparently. */ -int +static int linux_shmat(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -544,7 +560,7 @@ linux_shmat(p, uap, retval) * shmdt(): this could have been mapped directly, if it wasn't for * the extra indirection by the linux_ipc system call. */ -int +static int linux_shmdt(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -566,7 +582,7 @@ linux_shmdt(p, uap, retval) /* * Same story as shmdt. */ -int +static int linux_shmget(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { @@ -636,7 +652,7 @@ bsd_to_linux_shmid_ds(bsp, lsp) * * The usual structure conversion and massaging is done. */ -int +static int linux_shmctl(p, uap, retval) struct proc *p; struct linux_sys_ipc_args /* { diff --git a/sys/compat/linux/multiarch/linux_llseek.c b/sys/compat/linux/multiarch/linux_llseek.c index bde08cb6799..37f96a638f9 100644 --- a/sys/compat/linux/multiarch/linux_llseek.c +++ b/sys/compat/linux/multiarch/linux_llseek.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_llseek.c,v 1.13 1995/10/08 22:53:43 fvdl Exp $ */ +/* $NetBSD: linux_llseek.c,v 1.14 1996/04/05 00:01:21 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -54,6 +54,15 @@ #include <compat/linux/linux_fcntl.h> #include <compat/linux/linux_util.h> +#include <machine/linux_machdep.h> + +static int linux_to_bsd_ioflags __P((int)); +static int bsd_to_linux_ioflags __P((int)); +static void bsd_to_linux_flock __P((struct flock *, struct linux_flock *)); +static void linux_to_bsd_flock __P((struct linux_flock *, struct flock *)); +static void bsd_to_linux_stat __P((struct stat *, struct linux_stat *)); +static int linux_stat1 __P((struct proc *, void *, register_t *, int)); + /* * Some file-related calls are handled here. The usual flag conversion * an structure conversion is done, and alternate emul path searching. @@ -64,7 +73,8 @@ * of the flags used in open(2) and fcntl(2). */ static int -linux_to_bsd_ioflags(int lflags) +linux_to_bsd_ioflags(lflags) + int lflags; { int res = 0; @@ -84,7 +94,8 @@ linux_to_bsd_ioflags(int lflags) } static int -bsd_to_linux_ioflags(int bflags) +bsd_to_linux_ioflags(bflags) + int bflags; { int res = 0; @@ -483,9 +494,9 @@ linux_sys_fstat(p, v, retval) } static int -linux_stat1(p, uap, retval, dolstat) +linux_stat1(p, v, retval, dolstat) struct proc *p; - struct linux_sys_stat_args *uap; + void *v; register_t *retval; int dolstat; { @@ -494,6 +505,7 @@ linux_stat1(p, uap, retval, dolstat) struct stat *st, tmpst; caddr_t sg; int error; + struct linux_sys_stat_args *uap = v; sg = stackgap_init(p->p_emul); diff --git a/sys/compat/linux/multiarch/linux_socketcall.c b/sys/compat/linux/multiarch/linux_socketcall.c index 750ea1183cf..04c409cd167 100644 --- a/sys/compat/linux/multiarch/linux_socketcall.c +++ b/sys/compat/linux/multiarch/linux_socketcall.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socketcall.c,v 1.13 1996/03/08 04:56:05 mycroft Exp $ */ +/* $NetBSD: linux_socketcall.c,v 1.14 1996/04/05 00:01:50 christos Exp $ */ /* * Copyright (c) 1995 Frank van der Linden @@ -71,6 +71,36 @@ * are copied to structures. */ +int linux_to_bsd_domain __P((int)); +int linux_socket __P((struct proc *, struct linux_socket_args *, register_t *)); +int linux_bind __P((struct proc *, struct linux_bind_args *, register_t *)); +int linux_connect __P((struct proc *, struct linux_connect_args *, + register_t *)); +int linux_listen __P((struct proc *, struct linux_listen_args *, register_t *)); +int linux_accept __P((struct proc *, struct linux_accept_args *, register_t *)); +int linux_getsockname __P((struct proc *, struct linux_getsockname_args *, + register_t *)); +int linux_getpeername __P((struct proc *, struct linux_getpeername_args *, + register_t *)); +int linux_socketpair __P((struct proc *, struct linux_socketpair_args *, + register_t *)); +int linux_send __P((struct proc *, struct linux_send_args *, register_t *)); +int linux_recv __P((struct proc *, struct linux_recv_args *, register_t *)); +int linux_sendto __P((struct proc *, struct linux_sendto_args *, register_t *)); +int linux_recvfrom __P((struct proc *, struct linux_recvfrom_args *, + register_t *)); +int linux_shutdown __P((struct proc *, struct linux_shutdown_args *, + register_t *)); +int linux_to_bsd_sopt_level __P((int)); +int linux_to_bsd_so_sockopt __P((int)); +int linux_to_bsd_ip_sockopt __P((int)); +int linux_to_bsd_tcp_sockopt __P((int)); +int linux_to_bsd_udp_sockopt __P((int)); +int linux_setsockopt __P((struct proc *, struct linux_setsockopt_args *, + register_t *)); +int linux_getsockopt __P((struct proc *, struct linux_getsockopt_args *, + register_t *)); + /* * Convert between Linux and BSD socket domain values */ |
