summaryrefslogtreecommitdiff
path: root/sys/compat/linux/multiarch
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1996-04-05 00:01:10 +0000
committerchristos <christos@NetBSD.org>1996-04-05 00:01:10 +0000
commit151fa70f784fa4b83a16c26c345ea8309f370bd4 (patch)
tree3e08174c79d8a65fbdf218568ac603e4d4364060 /sys/compat/linux/multiarch
parentd7130e8385c2803816dab0e32f6c08c3720de103 (diff)
Prototyping changes.
Diffstat (limited to 'sys/compat/linux/multiarch')
-rw-r--r--sys/compat/linux/multiarch/linux_ipccall.c38
-rw-r--r--sys/compat/linux/multiarch/linux_llseek.c22
-rw-r--r--sys/compat/linux/multiarch/linux_socketcall.c32
3 files changed, 75 insertions, 17 deletions
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
*/