#define FREEBSD_RTP_LOOKUP 0
#define FREEBSD_RTP_SET 1
-#ifndef LOCORE
+#ifndef _LOCORE
struct freebsd_rtprio {
u_short type;
u_short prio;
+# $OpenBSD: Makefile,v 1.2 1996/04/17 05:23:42 mickey Exp $
# $NetBSD: Makefile,v 1.1 1995/02/28 23:26:21 fvdl Exp $
DEP= syscalls.conf syscalls.master ../../kern/makesyscalls.sh
+# $OpenBSD: files.linux,v 1.3 1996/04/17 05:23:42 mickey Exp $
# $NetBSD: files.linux,v 1.4 1996/03/08 04:55:59 mycroft Exp $
#
# Config.new file description for machine-independent Linux compat code.
+/* $OpenBSD: linux_dirent.h,v 1.2 1996/04/17 05:23:43 mickey Exp $ */
/* $NetBSD: linux_dirent.h,v 1.3 1995/10/07 06:26:59 mycroft Exp $ */
/*
+/* $OpenBSD: linux_errno.h,v 1.2 1996/04/17 05:23:44 mickey Exp $ */
/* $NetBSD: linux_errno.h,v 1.1 1995/02/28 23:25:34 fvdl Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
+/* $OpenBSD: linux_error.c,v 1.2 1996/04/17 05:23:45 mickey Exp $ */
/* $NetBSD: linux_error.c,v 1.2 1995/04/22 19:48:32 christos Exp $ */
/*
-/* $NetBSD: linux_exec.c,v 1.12 1995/10/07 06:27:00 mycroft Exp $ */
+/* $OpenBSD: linux_exec.c,v 1.2 1996/04/17 05:23:46 mickey Exp $ */
+/* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
#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>
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,
+/* $OpenBSD: linux_exec.h,v 1.2 1996/04/17 05:23:47 mickey Exp $ */
/* $NetBSD: linux_exec.h,v 1.5 1995/10/07 06:27:01 mycroft Exp $ */
/*
+/* $OpenBSD: linux_fcntl.h,v 1.2 1996/04/17 05:23:48 mickey Exp $ */
/* $NetBSD: linux_fcntl.h,v 1.1 1995/02/28 23:25:40 fvdl Exp $ */
/*
-/* $NetBSD: linux_file.c,v 1.13 1995/10/08 22:53:43 fvdl Exp $ */
+/* $OpenBSD: linux_file.c,v 1.2 1996/04/17 05:23:49 mickey Exp $ */
+/* $NetBSD: linux_file.c,v 1.14 1996/04/05 00:01:21 christos Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
#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.
* 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;
}
static int
-bsd_to_linux_ioflags(int bflags)
+bsd_to_linux_ioflags(bflags)
+ int bflags;
{
int res = 0;
}
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;
{
struct stat *st, tmpst;
caddr_t sg;
int error;
+ struct linux_sys_stat_args *uap = v;
sg = stackgap_init(p->p_emul);
-/* $NetBSD: linux_ioctl.c,v 1.13 1996/03/08 04:56:03 mycroft Exp $ */
+/* $OpenBSD: linux_ioctl.c,v 1.5 1996/04/17 05:23:50 mickey Exp $ */
+/* $NetBSD: linux_ioctl.c,v 1.14 1996/04/05 00:01:28 christos Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
#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,
-/* $NetBSD: linux_ioctl.h,v 1.3 1996/03/08 04:56:04 mycroft Exp $ */
+/* $OpenBSD: linux_ioctl.h,v 1.3 1996/04/17 05:23:51 mickey Exp $ */
+/* $NetBSD: linux_ioctl.h,v 1.4 1996/04/05 00:01:36 christos Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
#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 *));
-/* $NetBSD: linux_ipc.c,v 1.9 1995/10/08 22:49:29 fvdl Exp $ */
+/* $OpenBSD: linux_ipc.c,v 1.2 1996/04/17 05:23:52 mickey Exp $ */
+/* $NetBSD: linux_ipc.c,v 1.10 1996/04/05 00:01:44 christos Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
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
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
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;
syscallarg(int) a3;
syscallarg(caddr_t) ptr;
} */ *uap = v;
- int what, error;
switch (SCARG(uap, what)) {
#ifdef SYSVSEM
lmp->l_msg_ctime = bmp->msg_ctime;
}
-int
+static int
linux_msgsnd(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
return sys_msgsnd(p, &bma, retval);
}
-int
+static int
linux_msgrcv(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
return sys_msgrcv(p, &bma, retval);
}
-int
+static int
linux_msgget(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
return sys_msgget(p, &bma, retval);
}
-int
+static int
linux_msgctl(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
* 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 /* {
* 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 /* {
/*
* Same story as shmdt.
*/
-int
+static int
linux_shmget(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
*
* The usual structure conversion and massaging is done.
*/
-int
+static int
linux_shmctl(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
+/* $OpenBSD: linux_ipc.h,v 1.2 1996/04/17 05:23:53 mickey Exp $ */
/* $NetBSD: linux_ipc.h,v 1.1 1995/02/28 23:25:47 fvdl Exp $ */
/*
+/* $OpenBSD: linux_ipccall.h,v 1.2 1996/04/17 05:23:54 mickey Exp $ */
/* $NetBSD: linux_ipccall.h,v 1.2 1995/08/15 21:14:33 fvdl Exp $ */
/*
-/* $NetBSD: linux_misc.c,v 1.24 1995/12/18 14:35:08 fvdl Exp $ */
+/* $OpenBSD: linux_misc.c,v 1.4 1996/04/17 05:23:54 mickey Exp $ */
+/* $NetBSD: linux_misc.c,v 1.26 1996/04/04 23:56:01 christos Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
#include <compat/linux/linux_util.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
* to be converted in order for Linux binaries to get a valid signal
* number out of it.
*/
-static int
+static void
bsd_to_linux_wstat(status)
int *status;
{
return error;
bsd_to_linux_wstat(&tstat);
-
return copyout(&tstat, SCARG(uap, status), sizeof tstat);
}
void *v;
register_t *retval;
{
+#if 0
struct linux_sys_brk_args /* {
syscallarg(char *) nsize;
} */ *uap = v;
+#endif
return ENOSYS;
}
char *nbrk = SCARG(uap, nsize);
struct sys_obreak_args oba;
struct vmspace *vm = p->p_vmspace;
- int error = 0;
- caddr_t oldbrk, newbrk;
+ caddr_t oldbrk;
oldbrk = vm->vm_daddr + ctob(vm->vm_dsize);
/*
struct linux_sys_alarm_args /* {
syscallarg(unsigned int) secs;
} */ *uap = v;
- int error, s;
+ int s;
struct itimerval *itp, it;
itp = &p->p_realtimer;
} */ *uap = v;
register struct dirent *bdp;
struct vnode *vp;
- caddr_t inp, buf; /* BSD-format */
- int len, reclen; /* BSD-format */
- caddr_t outp; /* Linux-format */
- int resid, linux_reclen;/* Linux-format */
+ caddr_t inp, buf; /* BSD-format */
+ int len, reclen; /* BSD-format */
+ caddr_t outp; /* Linux-format */
+ int resid, linux_reclen = 0; /* Linux-format */
struct file *fp;
struct uio auio;
struct iovec aiov;
} */ *uap = v;
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)
return ESRCH;
+ }
else
targp = p;
+/* $OpenBSD: linux_mmap.h,v 1.2 1996/04/17 05:23:56 mickey Exp $ */
/* $NetBSD: linux_mmap.h,v 1.1 1995/02/28 23:25:52 fvdl Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
+/* $OpenBSD: linux_msg.h,v 1.2 1996/04/17 05:23:56 mickey Exp $ */
/* $NetBSD: linux_msg.h,v 1.2 1995/08/15 21:14:34 fvdl Exp $ */
/*
+/* $OpenBSD: linux_sem.h,v 1.2 1996/04/17 05:23:57 mickey Exp $ */
/* $NetBSD: linux_sem.h,v 1.1 1995/08/15 21:14:35 fvdl Exp $ */
/*
+/* $OpenBSD: linux_shm.h,v 1.2 1996/04/17 05:23:58 mickey Exp $ */
/* $NetBSD: linux_shm.h,v 1.1 1995/02/28 23:25:57 fvdl Exp $ */
/*
-/* $NetBSD: linux_signal.c,v 1.9 1995/10/07 06:27:12 mycroft Exp $ */
+/* $OpenBSD: linux_signal.c,v 1.2 1996/04/17 05:23:59 mickey Exp $ */
+/* $NetBSD: linux_signal.c,v 1.10 1996/04/04 23:51:36 christos Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
0,
};
+
+/* linux_signal.c */
+void linux_to_bsd_sigset __P((const linux_sigset_t *, sigset_t *));
+void bsd_to_linux_sigset __P((const sigset_t *, linux_sigset_t *));
+void linux_to_bsd_sigaction __P((struct linux_sigaction *, struct sigaction *));
+void bsd_to_linux_sigaction __P((struct sigaction *, struct linux_sigaction *));
+
/*
* Ok, we know that Linux and BSD signals both are just an unsigned int.
* Don't bother to use the sigismember() stuff for now.
{
bsa->sa_handler = lsa->sa_handler;
- linux_to_bsd_sigset(&bsa->sa_mask, &lsa->sa_mask);
+ linux_to_bsd_sigset(&lsa->sa_mask, &bsa->sa_mask);
bsa->sa_flags = 0;
if ((lsa->sa_flags & LINUX_SA_ONSTACK) != 0)
bsa->sa_flags |= SA_ONSTACK;
{
lsa->sa_handler = bsa->sa_handler;
- bsd_to_linux_sigset(&lsa->sa_mask, &bsa->sa_mask);
+ bsd_to_linux_sigset(&bsa->sa_mask, &lsa->sa_mask);
lsa->sa_flags = 0;
if ((bsa->sa_flags & SA_NOCLDSTOP) != 0)
lsa->sa_flags |= LINUX_SA_NOCLDSTOP;
bsd_to_linux_sigset(&p->p_sigmask, (linux_sigset_t *)retval);
mask = SCARG(uap, mask);
- bsd_to_linux_sigset(&mask, &bsdsig);
+ bsd_to_linux_sigset(&bsdsig, &mask);
splhigh();
p->p_sigmask = bsdsig & ~sigcantmask;
syscallarg(int) mask;
} */ *uap = v;
struct sys_sigsuspend_args sa;
+ linux_sigset_t mask = SCARG(uap, mask);
- linux_to_bsd_sigset(&SCARG(uap, mask), &SCARG(&sa, mask));
+ linux_to_bsd_sigset(&mask, &SCARG(&sa, mask));
return sys_sigsuspend(p, &sa, retval);
}
+/* $OpenBSD: linux_signal.h,v 1.2 1996/04/17 05:24:00 mickey Exp $ */
/* $NetBSD: linux_signal.h,v 1.4 1995/08/27 20:51:51 fvdl Exp $ */
/*
-/* $NetBSD: linux_socket.c,v 1.13 1996/03/08 04:56:05 mycroft Exp $ */
+/* $OpenBSD: linux_socket.c,v 1.3 1996/04/17 05:24:01 mickey Exp $ */
+/* $NetBSD: linux_socket.c,v 1.14 1996/04/05 00:01:50 christos Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
* 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
*/
+/* $OpenBSD: linux_socket.h,v 1.2 1996/04/17 05:24:02 mickey Exp $ */
/* $NetBSD: linux_socket.h,v 1.3 1995/05/28 10:16:34 mycroft Exp $ */
/*
+/* $OpenBSD: linux_socketcall.h,v 1.2 1996/04/17 05:24:03 mickey Exp $ */
/* $NetBSD: linux_socketcall.h,v 1.1 1995/02/28 23:26:05 fvdl Exp $ */
/*
+/* $OpenBSD: linux_sockio.h,v 1.4 1996/04/17 05:24:04 mickey Exp $ */
/* $NetBSD: linux_sockio.h,v 1.5 1996/03/08 04:56:07 mycroft Exp $ */
/*
+/* $OpenBSD: linux_syscall.h,v 1.3 1996/04/17 05:24:05 mickey Exp $ */
/*
* System call numbers.
*
+/* $OpenBSD: linux_syscallargs.h,v 1.4 1996/04/17 05:24:06 mickey Exp $ */
/*
* System call argument lists.
*
+/* $OpenBSD: linux_syscalls.c,v 1.3 1996/04/17 05:24:07 mickey Exp $ */
/*
* System call names.
*
+/* $OpenBSD: linux_sysent.c,v 1.4 1996/04/17 05:24:08 mickey Exp $ */
/*
* System call switch table.
*
-/* $NetBSD: linux_termios.c,v 1.1 1996/03/08 04:56:08 mycroft Exp $ */
+/* $OpenBSD: linux_termios.c,v 1.2 1996/04/17 05:24:08 mickey Exp $ */
+/* $NetBSD: linux_termios.c,v 1.3 1996/04/05 00:01:54 christos Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
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..
* values.
*/
-static int
+static void
linux_termio_to_bsd_termios(lt, bts)
register struct linux_termio *lt;
register struct termios *bts;
bts->c_cc[VMIN] = lt->c_cc[LINUX_VMIN];
}
-static int
+static void
bsd_termios_to_linux_termio(bts, lt)
register struct termios *bts;
register struct linux_termio *lt;
lt->c_line = 0;
}
-static int
+static void
linux_termios_to_bsd_termios(lts, bts)
register struct linux_termios *lts;
register struct termios *bts;
bts->c_cc[VREPRINT] = lts->c_cc[LINUX_VREPRINT];
}
-static int
+static void
bsd_termios_to_linux_termios(bts, lts)
register struct termios *bts;
register struct linux_termios *lts;
+/* $OpenBSD: linux_termios.h,v 1.2 1996/04/17 05:24:09 mickey Exp $ */
#define LINUX_TCGETS _LINUX_IO('T', 1)
#define LINUX_TCSETS _LINUX_IO('T', 2)
#define LINUX_TCSETSW _LINUX_IO('T', 3)
+/* $OpenBSD: linux_types.h,v 1.2 1996/04/17 05:24:10 mickey Exp $ */
/* $NetBSD: linux_types.h,v 1.4 1995/08/21 03:42:11 mycroft Exp $ */
/*
+/* $OpenBSD: linux_util.h,v 1.2 1996/04/17 05:24:11 mickey Exp $ */
/* $NetBSD: linux_util.h,v 1.5 1995/06/24 20:20:42 christos Exp $ */
/*
+# $OpenBSD: syscalls.conf,v 1.2 1996/04/17 05:24:12 mickey Exp $
# $NetBSD: syscalls.conf,v 1.1 1995/02/28 23:26:24 fvdl Exp $
sysnames="linux_syscalls.c"
+ $OpenBSD: syscalls.master,v 1.4 1996/04/17 05:24:13 mickey Exp $
$NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
-; NetBSD COMPAT_LINUX system call name/number "master" file.
+; OpenBSD COMPAT_LINUX system call name/number "master" file.
; (See syscalls.conf to see what it is processed into.)
;
; Fields: number type [type-dependent ...]
-/* $NetBSD: svr4_filio.c,v 1.3 1995/10/07 06:27:40 mycroft Exp $ */
+/* $NetBSD: svr4_filio.c,v 1.4 1996/03/30 22:37:52 christos Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
return copyout(&num, data, sizeof(num));
default:
- DPRINTF(("Unknown svr4 filio %x\n", cmd));
+ DPRINTF(("Unknown svr4 filio %lx\n", cmd));
return 0; /* ENOSYS really */
}
}
-/* $OpenBSD: svr4_ioctl.c,v 1.3 1996/02/26 23:31:57 niklas Exp $ */
-/* $NetBSD: svr4_ioctl.c,v 1.14 1996/02/10 00:48:08 christos Exp $ */
+/* $OpenBSD: svr4_ioctl.c,v 1.4 1996/04/17 05:24:17 mickey Exp $ */
+/* $NetBSD: svr4_ioctl.c,v 1.15 1996/03/30 22:37:57 christos Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
return svr4_sockioctl(fp, cmd, SCARG(uap, data), p, retval);
default:
- DPRINTF(("Unimplemented ioctl %x\n", cmd));
+ DPRINTF(("Unimplemented ioctl %lx\n", cmd));
return 0; /* XXX: really ENOSYS */
}
}
-/* $OpenBSD: svr4_misc.c,v 1.3 1996/02/26 23:31:57 niklas Exp $ */
-/* $NetBSD: svr4_misc.c,v 1.35 1996/02/10 17:12:31 christos Exp $ */
+/* $OpenBSD: svr4_misc.c,v 1.4 1996/04/17 05:24:18 mickey Exp $ */
+/* $NetBSD: svr4_misc.c,v 1.36 1996/03/30 22:38:02 christos Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
new = round_page(SCARG(uap, nsize));
diff = new - old;
- DPRINTF(("break(1): old %x new %x diff %x\n", old, new, diff));
+ DPRINTF(("break(1): old %lx new %lx diff %x\n", old, new, diff));
if (diff > p->p_rlimit[RLIMIT_DATA].rlim_cur)
return ENOMEM;
vm->vm_dsize, ctob(vm->vm_dsize)));
diff = new - old;
- DPRINTF(("break(3): old %x new %x diff %x\n", old, new, diff));
+ DPRINTF(("break(3): old %lx new %lx diff %x\n", old, new, diff));
if (diff > 0) {
rv = vm_allocate(&vm->vm_map, &old, diff, FALSE);
i.si_code = SVR4_CLD_KILLED;
}
- DPRINTF(("siginfo [pid %d signo %d code %d errno %d status %d]\n",
+ DPRINTF(("siginfo [pid %ld signo %d code %d errno %d status %d]\n",
i.si_pid, i.si_signo, i.si_code, i.si_errno, i.si_status));
return copyout(&i, s, sizeof(i));
-/* $OpenBSD: svr4_net.c,v 1.3 1996/02/26 23:31:59 niklas Exp $ */
-/* $NetBSD: svr4_net.c,v 1.6 1996/02/04 02:01:07 christos Exp $ */
+/* $OpenBSD: svr4_net.c,v 1.4 1996/04/17 05:24:19 mickey Exp $ */
+/* $NetBSD: svr4_net.c,v 1.8 1996/03/30 22:41:02 christos Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/device.h>
+#include <sys/conf.h>
#include <compat/svr4/svr4_types.h>
int svr4_netattach __P((int));
-static int svr4_netclose __P((struct file *fp, struct proc *p));
+static int svr4_soo_close __P((struct file *fp, struct proc *p));
static struct fileops svr4_netops = {
- soo_read, soo_write, soo_ioctl, soo_select, svr4_netclose
+ soo_read, soo_write, soo_ioctl, soo_select, svr4_soo_close
};
}
static int
-svr4_netclose(fp, p)
+svr4_soo_close(fp, p)
struct file *fp;
struct proc *p;
{
-/* $OpenBSD: svr4_signal.c,v 1.3 1996/02/26 23:31:59 niklas Exp $ */
-/* $NetBSD: svr4_signal.c,v 1.21 1996/02/09 23:12:18 christos Exp $ */
+/* $OpenBSD: svr4_signal.c,v 1.4 1996/04/17 05:24:20 mickey Exp $ */
+/* $NetBSD: svr4_signal.c,v 1.23 1996/03/30 22:38:07 christos Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
* All rights reserved.
#define svr4_sigismember(s, n) ((s)->bits[svr4_sigword(n)] & svr4_sigmask(n))
#define svr4_sigaddset(s, n) ((s)->bits[svr4_sigword(n)] |= svr4_sigmask(n))
-static __inline int svr4_sigfillset __P((svr4_sigset_t *));
+static __inline void svr4_sigfillset __P((svr4_sigset_t *));
void svr4_to_bsd_sigaction __P((const struct svr4_sigaction *,
struct sigaction *));
void bsd_to_svr4_sigaction __P((const struct sigaction *,
struct svr4_sigaction *));
-static __inline int
+static __inline void
svr4_sigfillset(s)
svr4_sigset_t *s;
{
switch (SCARG(uap, func)) {
case 0:
- DPRINTF(("getcontext(%x)\n", SCARG(uap, uc)));
+ DPRINTF(("getcontext(%p)\n", SCARG(uap, uc)));
svr4_getcontext(p, &uc, p->p_sigmask,
p->p_sigacts->ps_sigstk.ss_flags & SS_ONSTACK);
return copyout(&uc, SCARG(uap, uc), sizeof(uc));
case 1:
- DPRINTF(("setcontext(%x)\n", SCARG(uap, uc)));
+ DPRINTF(("setcontext(%p)\n", SCARG(uap, uc)));
if ((error = copyin(SCARG(uap, uc), &uc, sizeof(uc))) != 0)
return error;
return svr4_setcontext(p, &uc);
default:
- DPRINTF(("context(%d, %x)\n", SCARG(uap, func),
+ DPRINTF(("context(%d, %p)\n", SCARG(uap, func),
SCARG(uap, uc)));
return ENOSYS;
}
-/* $OpenBSD: svr4_sockio.c,v 1.2 1996/02/26 23:32:00 niklas Exp $ */
-/* $NetBSD: svr4_sockio.c,v 1.6 1996/02/09 23:12:20 christos Exp $ */
+/* $OpenBSD: svr4_sockio.c,v 1.3 1996/04/17 05:24:21 mickey Exp $ */
+/* $NetBSD: svr4_sockio.c,v 1.7 1996/03/30 22:38:14 christos Exp $ */
/*
* Copyright (c) 1995 Christos Zoulas
default:
- DPRINTF(("Unknown svr4 sockio %x\n", cmd));
+ DPRINTF(("Unknown svr4 sockio %lx\n", cmd));
return 0; /* ENOSYS really */
}
}
-/* $OpenBSD: svr4_stream.c,v 1.2 1996/02/26 23:32:03 niklas Exp $ */
-/* $NetBSD: svr4_stream.c,v 1.11 1996/02/10 00:48:12 christos Exp $ */
+/* $OpenBSD: svr4_stream.c,v 1.3 1996/04/17 05:24:22 mickey Exp $ */
+/* $NetBSD: svr4_stream.c,v 1.12 1996/03/30 22:38:19 christos Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
return 0;
default:
- DPRINTF(("Unknown sockmod ioctl %x\n", ioc->cmd));
+ DPRINTF(("Unknown sockmod ioctl %lx\n", ioc->cmd));
return 0;
}
return 0;
default:
- DPRINTF(("Unknown timod ioctl %x\n", ioc->cmd));
+ DPRINTF(("Unknown timod ioctl %lx\n", ioc->cmd));
return 0;
}
}
int error;
int i;
- printf("%s cmd = %d, timeout = %d, len = %d, buf = %p { ",
+ printf("%s cmd = %ld, timeout = %d, len = %d, buf = %p { ",
str, ioc->cmd, ioc->timeout, ioc->len, ioc->buf);
if ((error = copyin(ioc->buf, ptr, ioc->len)) != 0) {
break;
default:
- DPRINTF(("Unimplemented module %c %d\n",
+ DPRINTF(("Unimplemented module %c %ld\n",
(char) (cmd >> 8), cmd & 0xff));
return 0;
}
return 0;
default:
- DPRINTF(("unimpl cmd = %x\n", cmd));
+ DPRINTF(("unimpl cmd = %lx\n", cmd));
break;
}
return error;
}
default:
- DPRINTF(("putmsg: Unimplemented command %x\n", sc.cmd));
+ DPRINTF(("putmsg: Unimplemented command %lx\n", sc.cmd));
return ENOSYS;
}
}
-/* $NetBSD: svr4_termios.c,v 1.6 1995/10/14 20:24:58 christos Exp $ */
+/* $NetBSD: svr4_termios.c,v 1.8 1996/03/30 22:38:23 christos Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
return (*ctl)(fp, cmd, (caddr_t) &bt, p);
+ case SVR4_TIOCGWINSZ:
+ {
+ struct svr4_winsize ws;
+
+ error = (*ctl)(fp, TIOCGWINSZ, (caddr_t) &ws, p);
+ if (error)
+ return error;
+ return copyout(&st, data, sizeof(st));
+ }
+
+ case SVR4_TIOCSWINSZ:
+ {
+ struct svr4_winsize ws;
+
+ if ((error = copyin(data, &ws, sizeof(ws))) != 0)
+ return error;
+ return (*ctl)(fp, TIOCSWINSZ, (caddr_t) &ws, p);
+ }
+
default:
- DPRINTF(("Unknown svr4 termios %x\n", cmd));
+ DPRINTF(("Unknown svr4 termios %lx\n", cmd));
return ENOSYS;
}
}
-/* $NetBSD: svr4_ttold.c,v 1.7 1995/10/14 20:25:01 christos Exp $ */
+/* $NetBSD: svr4_ttold.c,v 1.8 1996/03/30 22:38:27 christos Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
}
default:
- DPRINTF(("Unknown svr4 ttold %x\n", cmd));
+ DPRINTF(("Unknown svr4 ttold %lx\n", cmd));
return 0; /* ENOSYS really */
}
}