- add a real linux_sys___sysctl because the mib numbers are different.
implement only the kernel version getting entries. - make the signal conversion functions consistent; dest is arg 1. - make linux_fakedev deal with block and char devices differently. - add linux_sys_ugetrlimit, and flesh out the regular get/setrlimit so that they work properly. - add linux_mmap2 [untested]. - bump kernel to 2.4.18, and make the date be valentine's day :-) - linux_sys_*stat64 family was totally busted. Fix it. tested only on i386. Status: gdb, telnet, work jdk-1.4.0 extractor works, jdk still coredumps. christos
This commit is contained in:
parent
d3d59b3e4f
commit
28debea38a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.c,v 1.19 2001/11/13 02:08:33 lukem Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.20 2002/02/15 16:47:58 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -42,7 +42,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.19 2001/11/13 02:08:33 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.20 2002/02/15 16:47:58 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -159,8 +159,8 @@ void setup_linux_rt_sigframe(tf, sig, mask)
|
|||
|
||||
/* Setup potentially partial signal mask in sc_mask. */
|
||||
/* But get all of it in uc_sigmask */
|
||||
native_to_linux_old_sigset(mask, &sigframe.uc.uc_mcontext.sc_mask);
|
||||
native_to_linux_sigset(mask, &sigframe.uc.uc_sigmask);
|
||||
native_to_linux_old_sigset(&sigframe.uc.uc_mcontext.sc_mask, mask);
|
||||
native_to_linux_sigset(&sigframe.uc.uc_sigmask, mask);
|
||||
|
||||
sigframe.uc.uc_mcontext.sc_pc = tf->tf_regs[FRAME_PC];
|
||||
sigframe.uc.uc_mcontext.sc_ps = ALPHA_PSL_USERMODE;
|
||||
|
@ -256,7 +256,7 @@ void setup_linux_sigframe(tf, sig, mask)
|
|||
*/
|
||||
bzero(&sigframe.sf_sc, sizeof(struct linux_ucontext));
|
||||
sigframe.sf_sc.sc_onstack = onstack;
|
||||
native_to_linux_old_sigset(mask, &sigframe.sf_sc.sc_mask);
|
||||
native_to_linux_old_sigset(&sigframe.sf_sc.sc_mask, mask);
|
||||
sigframe.sf_sc.sc_pc = tf->tf_regs[FRAME_PC];
|
||||
sigframe.sf_sc.sc_ps = ALPHA_PSL_USERMODE;
|
||||
frametoreg(tf, (struct reg *)sigframe.sf_sc.sc_regs);
|
||||
|
@ -524,8 +524,9 @@ linux_machdepioctl(p, v, retval)
|
|||
|
||||
/* XXX XAX fix this */
|
||||
dev_t
|
||||
linux_fakedev(dev)
|
||||
linux_fakedev(dev, raw)
|
||||
dev_t dev;
|
||||
int raw;
|
||||
{
|
||||
return dev;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.h,v 1.5 2000/12/14 18:10:14 mycroft Exp $ */
|
||||
/* $NetBSD: linux_machdep.h,v 1.6 2002/02/15 16:47:58 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -39,6 +39,8 @@
|
|||
#ifndef _ALPHA_LINUX_MACHDEP_H
|
||||
#define _ALPHA_LINUX_MACHDEP_H
|
||||
|
||||
#include <compat/linux/common/linux_signal.h>
|
||||
|
||||
/*
|
||||
* The Linux sigcontext, pretty much a standard alpha trapframe.
|
||||
*/
|
||||
|
@ -99,8 +101,6 @@ void setup_linux_rt_sigframe __P((struct trapframe *, int, sigset_t *));
|
|||
void setup_linux_sigframe __P((struct trapframe *, int, sigset_t *));
|
||||
int linux_restore_sigcontext __P((struct proc *, struct linux_sigcontext,
|
||||
sigset_t *));
|
||||
void linux_sendsig __P((sig_t, int, sigset_t *, u_long));
|
||||
dev_t linux_fakedev __P((dev_t));
|
||||
void linux_syscall_intern __P((struct proc *));
|
||||
__END_DECLS
|
||||
#endif /* !_KERNEL */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscall.h,v 1.41 2001/11/13 02:08:35 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscall.h,v 1.42 2002/02/15 16:47:59 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call numbers.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscallargs.h,v 1.40 2001/11/13 02:08:35 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscallargs.h,v 1.41 2002/02/15 16:47:59 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call argument lists.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscalls.c,v 1.42 2001/11/13 02:08:36 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscalls.c,v 1.43 2002/02/15 16:47:59 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call names.
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.42 2001/11/13 02:08:36 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.43 2002/02/15 16:47:59 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#if defined(_KERNEL_OPT)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_sysent.c,v 1.41 2001/11/13 02:08:37 lukem Exp $ */
|
||||
/* $NetBSD: linux_sysent.c,v 1.42 2002/02/15 16:47:59 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call switch table.
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.41 2001/11/13 02:08:37 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.42 2002/02/15 16:47:59 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_sysv.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.36 2001/09/08 07:09:43 manu Exp $
|
||||
$NetBSD: syscalls.master,v 1.37 2002/02/15 16:47:59 christos Exp $
|
||||
;
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
|
@ -341,8 +341,11 @@
|
|||
188 UNIMPL
|
||||
189 UNIMPL
|
||||
190 UNIMPL
|
||||
191 UNIMPL
|
||||
192 UNIMPL
|
||||
/* XXX: Dunno */
|
||||
191 STD { int linux_sys_ugetrlimit(int which, \
|
||||
struct rlimit *rlp); }
|
||||
192 STD { int linux_sys_mmap2(void *addr, size_t len, \
|
||||
int prot, int flags, int fd, off_t offset); }
|
||||
193 UNIMPL
|
||||
194 UNIMPL
|
||||
195 UNIMPL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.c,v 1.3 2002/02/02 16:52:45 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.4 2002/02/15 16:47:59 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.3 2002/02/02 16:52:45 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.4 2002/02/15 16:47:59 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -278,8 +278,9 @@ linux_sys_sigreturn(p, v, retval)
|
|||
* major device numbers remapping
|
||||
*/
|
||||
dev_t
|
||||
linux_fakedev(dev)
|
||||
linux_fakedev(dev, raw)
|
||||
dev_t dev;
|
||||
int raw;
|
||||
{
|
||||
/* XXX write me */
|
||||
return dev;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.h,v 1.2 2002/01/17 22:50:38 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_machdep.h,v 1.3 2002/02/15 16:47:59 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -39,6 +39,8 @@
|
|||
#ifndef _ARM_LINUX_MACHDEP_H_
|
||||
#define _ARM_LINUX_MACHDEP_H_
|
||||
|
||||
#include <compat/linux/common/linux_signal.h>
|
||||
|
||||
struct linux_sigcontext {
|
||||
u_int32_t sc_trapno;
|
||||
u_int32_t sc_error_code;
|
||||
|
@ -75,11 +77,4 @@ struct linux_sigframe {
|
|||
unsigned long sf_extramask[LINUX__NSIG_WORDS - 1];
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
__BEGIN_DECLS
|
||||
void linux_sendsig __P((sig_t, int, sigset_t *, u_long));
|
||||
dev_t linux_fakedev __P((dev_t));
|
||||
__END_DECLS
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscall.h,v 1.6 2002/01/27 15:28:22 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_syscall.h,v 1.7 2002/02/15 16:47:59 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call numbers.
|
||||
|
@ -466,6 +466,9 @@
|
|||
/* syscall: "vfork" ret: "int" args: */
|
||||
#define LINUX_SYS_vfork 190
|
||||
|
||||
/* syscall: "mmap2" ret: "int" args: "void *" "size_t" "int" "int" "int" "off_t" */
|
||||
#define LINUX_SYS_mmap2 192
|
||||
|
||||
/* syscall: "truncate64" ret: "int" args: "const char *" "off_t" */
|
||||
#define LINUX_SYS_truncate64 193
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscallargs.h,v 1.6 2002/01/27 15:28:22 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_syscallargs.h,v 1.7 2002/02/15 16:47:59 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call argument lists.
|
||||
|
@ -489,6 +489,15 @@ struct linux_sys_sigaltstack_args {
|
|||
syscallarg(struct linux_sigaltstack *) oss;
|
||||
};
|
||||
|
||||
struct linux_sys_mmap2_args {
|
||||
syscallarg(void *) addr;
|
||||
syscallarg(size_t) len;
|
||||
syscallarg(int) prot;
|
||||
syscallarg(int) flags;
|
||||
syscallarg(int) fd;
|
||||
syscallarg(off_t) offset;
|
||||
};
|
||||
|
||||
struct linux_sys_truncate64_args {
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(off_t) length;
|
||||
|
@ -682,6 +691,7 @@ int linux_sys_chown16(struct proc *, void *, register_t *);
|
|||
int sys___getcwd(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigaltstack(struct proc *, void *, register_t *);
|
||||
int sys___vfork14(struct proc *, void *, register_t *);
|
||||
int linux_sys_mmap2(struct proc *, void *, register_t *);
|
||||
int linux_sys_truncate64(struct proc *, void *, register_t *);
|
||||
int sys_ftruncate(struct proc *, void *, register_t *);
|
||||
int linux_sys_stat64(struct proc *, void *, register_t *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscalls.c,v 1.6 2002/01/27 15:28:22 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_syscalls.c,v 1.7 2002/02/15 16:47:59 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call names.
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.6 2002/01/27 15:28:22 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.7 2002/02/15 16:47:59 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#if defined(_KERNEL_OPT)
|
||||
|
@ -224,7 +224,7 @@ const char *const linux_syscallnames[] = {
|
|||
"#189 (unimplemented putpmsg)", /* 189 = unimplemented putpmsg */
|
||||
"vfork", /* 190 = vfork */
|
||||
"#191 (unimplemented getrlimit)", /* 191 = unimplemented getrlimit */
|
||||
"#192 (unimplemented mmap2)", /* 192 = unimplemented mmap2 */
|
||||
"mmap2", /* 192 = mmap2 */
|
||||
"truncate64", /* 193 = truncate64 */
|
||||
"ftruncate64", /* 194 = ftruncate64 */
|
||||
"stat64", /* 195 = stat64 */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_sysent.c,v 1.6 2002/01/27 15:28:22 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_sysent.c,v 1.7 2002/02/15 16:47:59 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call switch table.
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.6 2002/01/27 15:28:22 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.7 2002/02/15 16:47:59 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_43.h"
|
||||
|
@ -417,8 +417,8 @@ struct sysent linux_sysent[] = {
|
|||
sys___vfork14 }, /* 190 = vfork */
|
||||
{ 0, 0, 0,
|
||||
linux_sys_nosys }, /* 191 = unimplemented getrlimit */
|
||||
{ 0, 0, 0,
|
||||
linux_sys_nosys }, /* 192 = unimplemented mmap2 */
|
||||
{ 6, s(struct linux_sys_mmap2_args), 0,
|
||||
linux_sys_mmap2 }, /* 192 = mmap2 */
|
||||
{ 2, s(struct linux_sys_truncate64_args), 0,
|
||||
linux_sys_truncate64 }, /* 193 = truncate64 */
|
||||
{ 2, s(struct sys_ftruncate_args), 0,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.6 2002/01/27 15:27:33 bjh21 Exp $
|
||||
$NetBSD: syscalls.master,v 1.7 2002/02/15 16:47:59 christos Exp $
|
||||
|
||||
; Derived from sys/compat/linux/arch/*/syscalls.master
|
||||
; and from Linux 2.4.12 arch/arm/kernel/calls.S
|
||||
|
@ -322,8 +322,10 @@
|
|||
188 UNIMPL getpmsg
|
||||
189 UNIMPL putpmsg
|
||||
190 NOARGS vfork { int sys___vfork14(void); }
|
||||
191 UNIMPL getrlimit
|
||||
192 UNIMPL mmap2
|
||||
191 STD { int linux_sys_ugetrlimit(int which, \
|
||||
struct rlimit *rlp); }
|
||||
192 STD { int linux_sys_mmap2(void *addr, size_t len, \
|
||||
int prot, int flags, int fd, off_t offset); }
|
||||
193 STD { int linux_sys_truncate64(const char *path, \
|
||||
off_t length); }
|
||||
194 NOARGS ftruncate64 { int sys_ftruncate(int fd, \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.c,v 1.68 2001/11/13 02:08:38 lukem Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.69 2002/02/15 16:48:00 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.68 2001/11/13 02:08:38 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.69 2002/02/15 16:48:00 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_vm86.h"
|
||||
|
@ -212,7 +212,7 @@ linux_sendsig(catcher, sig, mask, code)
|
|||
/* Linux doesn't save the onstack flag in sigframe */
|
||||
|
||||
/* Save signal mask. */
|
||||
native_to_linux_old_sigset(mask, &frame.sf_sc.sc_mask);
|
||||
native_to_linux_old_sigset(&frame.sf_sc.sc_mask, mask);
|
||||
|
||||
if (copyout(&frame, fp, sizeof(frame)) != 0) {
|
||||
/*
|
||||
|
@ -334,7 +334,7 @@ linux_sys_sigreturn(p, v, retval)
|
|||
p->p_sigctx.ps_sigstk.ss_flags &= ~SS_ONSTACK;
|
||||
|
||||
/* Restore signal mask. */
|
||||
linux_old_to_native_sigset(&context.sc_mask, &mask);
|
||||
linux_old_to_native_sigset(&mask, &context.sc_mask);
|
||||
(void) sigprocmask1(p, SIG_SETMASK, &mask, 0);
|
||||
|
||||
return (EJUSTRETURN);
|
||||
|
@ -481,14 +481,19 @@ linux_sys_modify_ldt(p, v, retval)
|
|||
* array for all major device numbers, and map linux_mknod too.
|
||||
*/
|
||||
dev_t
|
||||
linux_fakedev(dev)
|
||||
linux_fakedev(dev, raw)
|
||||
dev_t dev;
|
||||
int raw;
|
||||
{
|
||||
if (raw) {
|
||||
#if (NWSDISPLAY > 0)
|
||||
if (major(dev) == NETBSD_WSCONS_MAJOR)
|
||||
return makedev(LINUX_CONS_MAJOR, (minor(dev) + 1));
|
||||
if (major(dev) == NETBSD_WSCONS_MAJOR)
|
||||
return makedev(LINUX_CONS_MAJOR, (minor(dev) + 1));
|
||||
#endif
|
||||
return dev;
|
||||
return 0;
|
||||
} else {
|
||||
return dev;
|
||||
}
|
||||
}
|
||||
|
||||
#if (NWSDISPLAY > 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.h,v 1.20 2001/01/09 13:01:03 fvdl Exp $ */
|
||||
/* $NetBSD: linux_machdep.h,v 1.21 2002/02/15 16:48:00 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -39,6 +39,8 @@
|
|||
#ifndef _I386_LINUX_MACHDEP_H
|
||||
#define _I386_LINUX_MACHDEP_H
|
||||
|
||||
#include <compat/linux/common/linux_signal.h>
|
||||
|
||||
/*
|
||||
* The Linux sigcontext, pretty much a standard 386 trapframe.
|
||||
*/
|
||||
|
@ -85,7 +87,6 @@ struct linux_sigframe {
|
|||
#ifdef _KERNEL
|
||||
__BEGIN_DECLS
|
||||
void linux_sendsig __P((sig_t, int, sigset_t *, u_long));
|
||||
dev_t linux_fakedev __P((dev_t));
|
||||
__END_DECLS
|
||||
#endif /* _KERNEL */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_signal.h,v 1.9 2000/08/23 16:59:52 christos Exp $ */
|
||||
/* $NetBSD: linux_signal.h,v 1.10 2002/02/15 16:48:00 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -83,32 +83,34 @@
|
|||
|
||||
/* sa_flags */
|
||||
#define LINUX_SA_NOCLDSTOP 0x00000001
|
||||
#define LINUX_SA_NOCLDWAIT 0x00000002
|
||||
#define LINUX_SA_SIGINFO 0x00000004
|
||||
#define LINUX_SA_RESTORER 0x04000000
|
||||
#define LINUX_SA_ONSTACK 0x08000000
|
||||
#define LINUX_SA_RESTART 0x10000000
|
||||
#define LINUX_SA_INTERRUPT 0x20000000
|
||||
#define LINUX_SA_NOMASK 0x40000000
|
||||
#define LINUX_SA_ONESHOT 0x80000000
|
||||
#define LINUX_SA_ALLBITS 0xf8000001
|
||||
#define LINUX_SA_ALLBITS 0xfc000007
|
||||
|
||||
typedef void (*linux_handler_t) __P((int));
|
||||
|
||||
typedef u_long linux_old_sigset_t;
|
||||
typedef unsigned long linux_old_sigset_t;
|
||||
typedef struct {
|
||||
u_long sig[LINUX__NSIG_WORDS];
|
||||
unsigned long sig[LINUX__NSIG_WORDS];
|
||||
} linux_sigset_t;
|
||||
|
||||
struct linux_old_sigaction {
|
||||
linux_handler_t sa_handler;
|
||||
linux_old_sigset_t sa_mask;
|
||||
u_long sa_flags;
|
||||
unsigned long sa_flags;
|
||||
void (*sa_restorer) __P((void));
|
||||
};
|
||||
|
||||
/* Used in rt_* calls */
|
||||
struct linux_sigaction {
|
||||
linux_handler_t sa_handler;
|
||||
u_long sa_flags;
|
||||
unsigned long sa_flags;
|
||||
void (*sa_restorer) __P((void));
|
||||
linux_sigset_t sa_mask;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscall.h,v 1.40 2001/11/13 02:08:40 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscall.h,v 1.41 2002/02/15 16:48:00 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call numbers.
|
||||
|
@ -479,6 +479,12 @@
|
|||
/* syscall: "__vfork14" ret: "int" args: */
|
||||
#define LINUX_SYS___vfork14 190
|
||||
|
||||
/* syscall: "ugetrlimit" ret: "int" args: "int" "struct orlimit *" */
|
||||
#define LINUX_SYS_ugetrlimit 191
|
||||
|
||||
/* syscall: "mmap2" ret: "off_t" args: "void *" "size_t" "int" "int" "int" "off_t" */
|
||||
#define LINUX_SYS_mmap2 192
|
||||
|
||||
/* syscall: "truncate64" ret: "int" args: "const char *" "off_t" */
|
||||
#define LINUX_SYS_truncate64 193
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscallargs.h,v 1.40 2001/11/13 02:08:40 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscallargs.h,v 1.41 2002/02/15 16:48:00 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call argument lists.
|
||||
|
@ -199,6 +199,16 @@ struct linux_sys_sigpending_args {
|
|||
syscallarg(linux_old_sigset_t *) set;
|
||||
};
|
||||
|
||||
struct linux_sys_setrlimit_args {
|
||||
syscallarg(u_int) which;
|
||||
syscallarg(struct orlimit *) rlp;
|
||||
};
|
||||
|
||||
struct linux_sys_getrlimit_args {
|
||||
syscallarg(u_int) which;
|
||||
syscallarg(struct orlimit *) rlp;
|
||||
};
|
||||
|
||||
struct linux_sys_gettimeofday_args {
|
||||
syscallarg(struct timeval *) tp;
|
||||
syscallarg(struct timezone *) tzp;
|
||||
|
@ -517,6 +527,20 @@ struct linux_sys_sigaltstack_args {
|
|||
syscallarg(struct linux_sigaltstack *) oss;
|
||||
};
|
||||
|
||||
struct linux_sys_ugetrlimit_args {
|
||||
syscallarg(int) which;
|
||||
syscallarg(struct orlimit *) rlp;
|
||||
};
|
||||
|
||||
struct linux_sys_mmap2_args {
|
||||
syscallarg(void *) addr;
|
||||
syscallarg(size_t) len;
|
||||
syscallarg(int) prot;
|
||||
syscallarg(int) flags;
|
||||
syscallarg(int) fd;
|
||||
syscallarg(off_t) offset;
|
||||
};
|
||||
|
||||
struct linux_sys_truncate64_args {
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(off_t) length;
|
||||
|
@ -643,8 +667,8 @@ int linux_sys_setregid16(struct proc *, void *, register_t *);
|
|||
int linux_sys_sigsuspend(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigpending(struct proc *, void *, register_t *);
|
||||
int compat_43_sys_sethostname(struct proc *, void *, register_t *);
|
||||
int compat_43_sys_setrlimit(struct proc *, void *, register_t *);
|
||||
int compat_43_sys_getrlimit(struct proc *, void *, register_t *);
|
||||
int linux_sys_setrlimit(struct proc *, void *, register_t *);
|
||||
int linux_sys_getrlimit(struct proc *, void *, register_t *);
|
||||
int sys_getrusage(struct proc *, void *, register_t *);
|
||||
int linux_sys_gettimeofday(struct proc *, void *, register_t *);
|
||||
int linux_sys_settimeofday(struct proc *, void *, register_t *);
|
||||
|
@ -735,6 +759,8 @@ int linux_sys_chown16(struct proc *, void *, register_t *);
|
|||
int sys___getcwd(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigaltstack(struct proc *, void *, register_t *);
|
||||
int sys___vfork14(struct proc *, void *, register_t *);
|
||||
int linux_sys_ugetrlimit(struct proc *, void *, register_t *);
|
||||
int linux_sys_mmap2(struct proc *, void *, register_t *);
|
||||
int linux_sys_truncate64(struct proc *, void *, register_t *);
|
||||
int sys_ftruncate(struct proc *, void *, register_t *);
|
||||
int linux_sys_stat64(struct proc *, void *, register_t *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscalls.c,v 1.41 2001/11/13 02:08:40 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscalls.c,v 1.42 2002/02/15 16:48:00 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call names.
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.41 2001/11/13 02:08:40 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.42 2002/02/15 16:48:00 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#if defined(_KERNEL_OPT)
|
||||
|
@ -219,8 +219,8 @@ const char *const linux_syscallnames[] = {
|
|||
"#188 (unimplemented getpmsg)", /* 188 = unimplemented getpmsg */
|
||||
"#189 (unimplemented putpmsg)", /* 189 = unimplemented putpmsg */
|
||||
"__vfork14", /* 190 = __vfork14 */
|
||||
"#191 (unimplemented getrlimit)", /* 191 = unimplemented getrlimit */
|
||||
"#192 (unimplemented mmap2)", /* 192 = unimplemented mmap2 */
|
||||
"ugetrlimit", /* 191 = ugetrlimit */
|
||||
"mmap2", /* 192 = mmap2 */
|
||||
"truncate64", /* 193 = truncate64 */
|
||||
"linux_ftruncate64", /* 194 = linux_ftruncate64 */
|
||||
"stat64", /* 195 = stat64 */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_sysent.c,v 1.40 2001/11/13 02:08:41 lukem Exp $ */
|
||||
/* $NetBSD: linux_sysent.c,v 1.41 2002/02/15 16:48:00 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call switch table.
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.40 2001/11/13 02:08:41 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.41 2002/02/15 16:48:00 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_43.h"
|
||||
|
@ -178,10 +178,10 @@ struct sysent linux_sysent[] = {
|
|||
linux_sys_sigpending }, /* 73 = sigpending */
|
||||
{ 2, s(struct compat_43_sys_sethostname_args), 0,
|
||||
compat_43_sys_sethostname }, /* 74 = sethostname */
|
||||
{ 2, s(struct compat_43_sys_setrlimit_args), 0,
|
||||
compat_43_sys_setrlimit }, /* 75 = setrlimit */
|
||||
{ 2, s(struct compat_43_sys_getrlimit_args), 0,
|
||||
compat_43_sys_getrlimit }, /* 76 = getrlimit */
|
||||
{ 2, s(struct linux_sys_setrlimit_args), 0,
|
||||
linux_sys_setrlimit }, /* 75 = setrlimit */
|
||||
{ 2, s(struct linux_sys_getrlimit_args), 0,
|
||||
linux_sys_getrlimit }, /* 76 = getrlimit */
|
||||
{ 2, s(struct sys_getrusage_args), 0,
|
||||
sys_getrusage }, /* 77 = getrusage */
|
||||
{ 2, s(struct linux_sys_gettimeofday_args), 0,
|
||||
|
@ -410,10 +410,10 @@ struct sysent linux_sysent[] = {
|
|||
linux_sys_nosys }, /* 189 = unimplemented putpmsg */
|
||||
{ 0, 0, 0,
|
||||
sys___vfork14 }, /* 190 = __vfork14 */
|
||||
{ 0, 0, 0,
|
||||
linux_sys_nosys }, /* 191 = unimplemented getrlimit */
|
||||
{ 0, 0, 0,
|
||||
linux_sys_nosys }, /* 192 = unimplemented mmap2 */
|
||||
{ 2, s(struct linux_sys_ugetrlimit_args), 0,
|
||||
linux_sys_ugetrlimit }, /* 191 = ugetrlimit */
|
||||
{ 6, s(struct linux_sys_mmap2_args), 0,
|
||||
linux_sys_mmap2 }, /* 192 = mmap2 */
|
||||
{ 2, s(struct linux_sys_truncate64_args), 0,
|
||||
linux_sys_truncate64 }, /* 193 = truncate64 */
|
||||
{ 2, s(struct sys_ftruncate_args), 0,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_types.h,v 1.8 2000/12/12 19:07:59 jdolecek Exp $ */
|
||||
/* $NetBSD: linux_types.h,v 1.9 2002/02/15 16:48:00 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -99,36 +99,34 @@ struct linux_stat {
|
|||
* insane amounts of padding around dev_t's.
|
||||
*/
|
||||
struct linux_stat64 {
|
||||
unsigned short lst_dev;
|
||||
unsigned char __pad0[10];
|
||||
unsigned long long lst_dev;
|
||||
unsigned int __pad1;
|
||||
|
||||
unsigned long lst_ino;
|
||||
unsigned int lst_ino;
|
||||
unsigned int lst_mode;
|
||||
unsigned int lst_nlink;
|
||||
|
||||
unsigned long lst_uid;
|
||||
unsigned long lst_gid;
|
||||
unsigned int lst_uid;
|
||||
unsigned int lst_gid;
|
||||
|
||||
unsigned short lst_rdev;
|
||||
unsigned char __pad3[10];
|
||||
unsigned long long lst_rdev;
|
||||
unsigned int __pad2;
|
||||
|
||||
long long lst_size;
|
||||
unsigned long lst_blksize;
|
||||
unsigned int lst_blksize;
|
||||
|
||||
unsigned long lst_blocks; /* Number 512-byte blocks allocated. */
|
||||
unsigned long __pad4; /* future possible st_blocks high bits*/
|
||||
unsigned long long lst_blocks; /* Number 512-byte blocks allocated. */
|
||||
|
||||
unsigned long lst_atime;
|
||||
unsigned long __pad5;
|
||||
unsigned int lst_atime;
|
||||
unsigned int __unused1;
|
||||
|
||||
unsigned long lst_mtime;
|
||||
unsigned long __pad6;
|
||||
unsigned int lst_mtime;
|
||||
unsigned int __unused2;
|
||||
|
||||
unsigned long lst_ctime;
|
||||
unsigned long __pad7; /* will be high 32 bits of ctime someday */
|
||||
unsigned int lst_ctime;
|
||||
unsigned int __unused3; /* will be high 32 bits of ctime someday */
|
||||
|
||||
unsigned long __unused1;
|
||||
unsigned long __unused2;
|
||||
unsigned long long lst_ino64;
|
||||
};
|
||||
|
||||
#endif /* !_I386_LINUX_TYPES_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.60 2001/09/30 20:44:50 manu Exp $
|
||||
$NetBSD: syscalls.master,v 1.61 2002/02/15 16:48:00 christos Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
|
@ -144,9 +144,9 @@
|
|||
73 STD { int linux_sys_sigpending(linux_old_sigset_t *set); }
|
||||
74 NOARGS { int compat_43_sys_sethostname(char *hostname, \
|
||||
u_int len);}
|
||||
75 NOARGS { int compat_43_sys_setrlimit(u_int which, \
|
||||
75 STD { int linux_sys_setrlimit(u_int which, \
|
||||
struct orlimit *rlp); }
|
||||
76 NOARGS { int compat_43_sys_getrlimit(u_int which, \
|
||||
76 STD { int linux_sys_getrlimit(u_int which, \
|
||||
struct orlimit *rlp); }
|
||||
77 NOARGS { int sys_getrusage(int who, struct rusage *rusage); }
|
||||
78 STD { int linux_sys_gettimeofday(struct timeval *tp, \
|
||||
|
@ -317,19 +317,21 @@
|
|||
188 UNIMPL getpmsg
|
||||
189 UNIMPL putpmsg
|
||||
190 NOARGS { int sys___vfork14(void); }
|
||||
191 UNIMPL getrlimit
|
||||
192 UNIMPL mmap2
|
||||
191 STD { int linux_sys_ugetrlimit(int which, \
|
||||
struct orlimit *rlp); }
|
||||
192 STD { off_t linux_sys_mmap2(void *addr, size_t len, \
|
||||
int prot, int flags, int fd, off_t offset); }
|
||||
193 STD { int linux_sys_truncate64(const char *path, \
|
||||
off_t length); }
|
||||
off_t length); }
|
||||
194 NOARGS linux_ftruncate64 { int sys_ftruncate(int fd, off_t length); }
|
||||
195 STD { int linux_sys_stat64(const char *path, \
|
||||
struct linux_stat64 *sp); }
|
||||
struct linux_stat64 *sp); }
|
||||
196 STD { int linux_sys_lstat64(const char *path, \
|
||||
struct linux_stat64 *sp); }
|
||||
struct linux_stat64 *sp); }
|
||||
197 STD { int linux_sys_fstat64(int fd, \
|
||||
struct linux_stat64 *sp); }
|
||||
198 STD { int linux_sys_lchown(const char *path, uid_t uid, \
|
||||
gid_t gid); }
|
||||
struct linux_stat64 *sp); }
|
||||
198 STD { int linux_sys_lchown(const char *path, uid_t uid, \
|
||||
gid_t gid); }
|
||||
199 NOARGS { uid_t sys_getuid(void); }
|
||||
200 NOARGS { gid_t sys_getgid(void); }
|
||||
201 NOARGS { uid_t sys_geteuid(void); }
|
||||
|
@ -339,7 +341,7 @@
|
|||
205 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
206 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
207 NOARGS { int sys___posix_fchown(int fd, uid_t uid, \
|
||||
gid_t gid); }
|
||||
gid_t gid); }
|
||||
208 STD { int linux_sys_setresuid(uid_t ruid, uid_t euid, \
|
||||
uid_t suid); }
|
||||
209 STD { int linux_sys_getresuid(uid_t *ruid, uid_t *euid, \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.c,v 1.9 2001/11/13 02:08:41 lukem Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.10 2002/02/15 16:48:01 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.9 2001/11/13 02:08:41 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.10 2002/02/15 16:48:01 christos Exp $");
|
||||
|
||||
#define COMPAT_LINUX 1
|
||||
|
||||
|
@ -223,10 +223,10 @@ setup_linux_sigframe(frame, sig, mask, usp)
|
|||
|
||||
/* Build the signal context to be used by sigreturn. */
|
||||
#if LINUX__NSIG_WORDS > 1
|
||||
native_to_linux_old_extra_sigset(mask,
|
||||
&kf.sf_c.c_sc.sc_mask, kf.sf_c.c_extrasigmask);
|
||||
native_to_linux_old_extra_sigset(&kf.sf_c.c_sc.sc_mask,
|
||||
kf.sf_c.c_extrasigmask, mask);
|
||||
#else
|
||||
native_to_linux_old_sigset(mask, &kf.sf_c.c_sc.sc_mask);
|
||||
native_to_linux_old_sigset(&kf.sf_c.c_sc.sc_mask, mask);
|
||||
#endif
|
||||
kf.sf_c.c_sc.sc_sp = frame->f_regs[SP];
|
||||
kf.sf_c.c_sc.sc_pc = frame->f_pc;
|
||||
|
@ -405,7 +405,7 @@ setup_linux_rt_sigframe(frame, sig, mask, usp, p)
|
|||
kf.sf_info.si_uid = p->p_ucred->cr_uid; /* Use real uid here? */
|
||||
|
||||
/* Build the signal context to be used by sigreturn. */
|
||||
native_to_linux_sigset(mask, &kf.sf_uc.uc_sigmask);
|
||||
native_to_linux_sigset(&kf.sf_uc.uc_sigmask, mask);
|
||||
kf.sf_uc.uc_stack.ss_sp = p->p_sigctx.ps_sigstk.ss_sp;
|
||||
kf.sf_uc.uc_stack.ss_flags =
|
||||
(p->p_sigctx.ps_sigstk.ss_flags & SS_ONSTACK ? LINUX_SS_ONSTACK : 0) |
|
||||
|
@ -875,8 +875,9 @@ linux_sys_cacheflush(p, v, retval)
|
|||
* Convert NetBSD's devices to Linux's.
|
||||
*/
|
||||
dev_t
|
||||
linux_fakedev(dev)
|
||||
linux_fakedev(dev, raw)
|
||||
dev_t dev;
|
||||
int raw;
|
||||
{
|
||||
|
||||
/* do nothing for now */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.h,v 1.2 1999/04/19 20:58:38 kleink Exp $ */
|
||||
/* $NetBSD: linux_machdep.h,v 1.3 2002/02/15 16:48:01 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -159,12 +159,4 @@ struct linux_rt_sigframe {
|
|||
#define LINUX_RT_SF_SIGTRAMP1 (0x00004E40 | (LINUX_SYS_rt_sigreturn << 16))
|
||||
/* movel #LINUX_SYS_rt_sigreturn,#d0; trap #0 */
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
/* linux_machdep.c */
|
||||
void linux_sendsig __P((sig_t, int, sigset_t *, u_long));
|
||||
dev_t linux_fakedev __P((dev_t));
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _M68K_LINUX_MACHDEP_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscall.h,v 1.37 2001/11/13 02:08:42 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscall.h,v 1.38 2002/02/15 16:48:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call numbers.
|
||||
|
@ -465,6 +465,9 @@
|
|||
/* syscall: "__vfork14" ret: "int" args: */
|
||||
#define LINUX_SYS___vfork14 190
|
||||
|
||||
/* syscall: "mmap2" ret: "off_t" args: "void *" "size_t" "int" "int" "int" "off_t" */
|
||||
#define LINUX_SYS_mmap2 192
|
||||
|
||||
/* syscall: "truncate64" ret: "int" args: "const char *" "off_t" */
|
||||
#define LINUX_SYS_truncate64 193
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscallargs.h,v 1.37 2001/11/13 02:08:42 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscallargs.h,v 1.38 2002/02/15 16:48:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call argument lists.
|
||||
|
@ -488,6 +488,15 @@ struct linux_sys_sigaltstack_args {
|
|||
syscallarg(struct linux_sigaltstack *) oss;
|
||||
};
|
||||
|
||||
struct linux_sys_mmap2_args {
|
||||
syscallarg(void *) addr;
|
||||
syscallarg(size_t) len;
|
||||
syscallarg(int) prot;
|
||||
syscallarg(int) flags;
|
||||
syscallarg(int) fd;
|
||||
syscallarg(off_t) offset;
|
||||
};
|
||||
|
||||
struct linux_sys_truncate64_args {
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(off_t) length;
|
||||
|
@ -713,6 +722,7 @@ int linux_sys_lchown16(struct proc *, void *, register_t *);
|
|||
int sys___getcwd(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigaltstack(struct proc *, void *, register_t *);
|
||||
int sys___vfork14(struct proc *, void *, register_t *);
|
||||
int linux_sys_mmap2(struct proc *, void *, register_t *);
|
||||
int linux_sys_truncate64(struct proc *, void *, register_t *);
|
||||
int sys_ftruncate(struct proc *, void *, register_t *);
|
||||
int linux_sys_stat64(struct proc *, void *, register_t *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscalls.c,v 1.38 2001/11/13 02:08:43 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscalls.c,v 1.39 2002/02/15 16:48:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call names.
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.38 2001/11/13 02:08:43 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.39 2002/02/15 16:48:01 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#if defined(_KERNEL_OPT)
|
||||
|
@ -239,7 +239,7 @@ const char *const linux_syscallnames[] = {
|
|||
"#189 (unimplemented putpmsg)", /* 189 = unimplemented putpmsg */
|
||||
"__vfork14", /* 190 = __vfork14 */
|
||||
"#191 (unimplemented getrlimit)", /* 191 = unimplemented getrlimit */
|
||||
"#192 (unimplemented mmap2)", /* 192 = unimplemented mmap2 */
|
||||
"mmap2", /* 192 = mmap2 */
|
||||
"truncate64", /* 193 = truncate64 */
|
||||
"ftruncate64", /* 194 = ftruncate64 */
|
||||
"stat64", /* 195 = stat64 */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_sysent.c,v 1.37 2001/11/13 02:08:43 lukem Exp $ */
|
||||
/* $NetBSD: linux_sysent.c,v 1.38 2002/02/15 16:48:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call switch table.
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.37 2001/11/13 02:08:43 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.38 2002/02/15 16:48:01 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -437,8 +437,8 @@ struct sysent linux_sysent[] = {
|
|||
sys___vfork14 }, /* 190 = __vfork14 */
|
||||
{ 0, 0, 0,
|
||||
linux_sys_nosys }, /* 191 = unimplemented getrlimit */
|
||||
{ 0, 0, 0,
|
||||
linux_sys_nosys }, /* 192 = unimplemented mmap2 */
|
||||
{ 6, s(struct linux_sys_mmap2_args), 0,
|
||||
linux_sys_mmap2 }, /* 192 = mmap2 */
|
||||
{ 2, s(struct linux_sys_truncate64_args), 0,
|
||||
linux_sys_truncate64 }, /* 193 = truncate64 */
|
||||
{ 2, s(struct sys_ftruncate_args), 0,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.34 2001/05/30 11:37:27 mrg Exp $
|
||||
$NetBSD: syscalls.master,v 1.35 2002/02/15 16:48:01 christos Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
|
@ -335,19 +335,21 @@
|
|||
188 UNIMPL getpmsg
|
||||
189 UNIMPL putpmsg
|
||||
190 NOARGS { int sys___vfork14(void); }
|
||||
191 UNIMPL getrlimit
|
||||
192 UNIMPL mmap2
|
||||
191 STD { int linux_sys_ugetrlimit(int which, \
|
||||
struct rlimit *rlp); }
|
||||
192 STD { off_t linux_sys_mmap2(void *addr, size_t len, \
|
||||
int prot, int flags, int fd, off_t offset); }
|
||||
193 STD { int linux_sys_truncate64(const char *path, \
|
||||
off_t length); }
|
||||
off_t length); }
|
||||
194 NOARGS ftruncate64 { int sys_ftruncate(int fd, off_t length); }
|
||||
195 STD { int linux_sys_stat64(const char *path, \
|
||||
struct linux_stat64 *sp); }
|
||||
struct linux_stat64 *sp); }
|
||||
196 STD { int linux_sys_lstat64(const char *path, \
|
||||
struct linux_stat64 *sp); }
|
||||
struct linux_stat64 *sp); }
|
||||
197 STD { int linux_sys_fstat64(int fd, \
|
||||
struct linux_stat64 *sp); }
|
||||
struct linux_stat64 *sp); }
|
||||
198 STD { int linux_sys_chown(const char *path, uid_t uid, \
|
||||
gid_t gid); }
|
||||
gid_t gid); }
|
||||
199 NOARGS { uid_t sys_getuid(void); }
|
||||
200 NOARGS { gid_t sys_getgid(void); }
|
||||
201 NOARGS { uid_t sys_geteuid(void); }
|
||||
|
@ -357,7 +359,7 @@
|
|||
205 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
206 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
207 NOARGS { int sys___posix_fchown(int fd, uid_t uid, \
|
||||
gid_t gid); }
|
||||
gid_t gid); }
|
||||
208 STD { int linux_sys_setresuid(uid_t ruid, uid_t euid, \
|
||||
uid_t suid); }
|
||||
209 STD { int linux_sys_getresuid(uid_t *ruid, uid_t *euid, \
|
||||
|
@ -367,7 +369,7 @@
|
|||
211 STD { int linux_sys_getresgid(gid_t *rgid, gid_t *egid, \
|
||||
gid_t *sgid); }
|
||||
212 STD { int linux_sys_lchown(const char *path, uid_t uid, \
|
||||
gid_t gid); }
|
||||
gid_t gid); }
|
||||
213 NOARGS { int sys_setuid(uid_t uid); }
|
||||
214 NOARGS { int sys_setgid(gid_t gid); }
|
||||
215 STD { int linux_sys_setfsuid(uid_t uid); }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.c,v 1.9 2001/11/20 21:50:13 manu Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.10 2002/02/15 16:48:01 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.9 2001/11/20 21:50:13 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.10 2002/02/15 16:48:01 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -315,8 +315,9 @@ linux_sys_modify_ldt(p, v, retval)
|
|||
* major device numbers remapping
|
||||
*/
|
||||
dev_t
|
||||
linux_fakedev(dev)
|
||||
linux_fakedev(dev, raw)
|
||||
dev_t dev;
|
||||
int raw;
|
||||
{
|
||||
/* XXX write me */
|
||||
return dev;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.h,v 1.4 2001/09/30 20:52:40 manu Exp $ */
|
||||
/* $NetBSD: linux_machdep.h,v 1.5 2002/02/15 16:48:01 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -134,13 +134,6 @@ struct linux_rt_sigframe
|
|||
*/
|
||||
#define LINUX___NEW_UTS_LEN 64
|
||||
|
||||
#ifdef _KERNEL
|
||||
__BEGIN_DECLS
|
||||
void linux_sendsig __P((sig_t, int, sigset_t *, u_long));
|
||||
dev_t linux_fakedev __P((dev_t));
|
||||
__END_DECLS
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* Major device numbers of VT device on both Linux and NetBSD. Used in
|
||||
* ugly patch to fake device numbers.
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* $NetBSD: linux_syscall.h,v 1.6 2001/11/20 21:37:51 manu Exp $ */
|
||||
/* $NetBSD: linux_syscall.h,v 1.7 2002/02/15 16:48:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call numbers.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.3 2001/10/06 13:32:59 manu Exp
|
||||
* created from NetBSD: syscalls.master,v 1.4 2001/11/20 21:37:51 manu Exp
|
||||
*/
|
||||
|
||||
/* syscall: "syscall" ret: "int" args: */
|
||||
|
@ -506,19 +506,4 @@
|
|||
/* syscall: "sigaltstack" ret: "int" args: "const struct linux_sigaltstack *" "struct linux_sigaltstack *" */
|
||||
#define LINUX_SYS_sigaltstack 206
|
||||
|
||||
/* syscall: "truncate64" ret: "int" args: "const char *" "off_t" */
|
||||
#define LINUX_SYS_truncate64 211
|
||||
|
||||
/* syscall: "stat64" ret: "int" args: "const char *" "struct linux_stat64 *" */
|
||||
#define LINUX_SYS_stat64 213
|
||||
|
||||
/* syscall: "lstat64" ret: "int" args: "const char *" "struct linux_stat64 *" */
|
||||
#define LINUX_SYS_lstat64 214
|
||||
|
||||
/* syscall: "fstat64" ret: "int" args: "int" "struct linux_stat64 *" */
|
||||
#define LINUX_SYS_fstat64 215
|
||||
|
||||
/* syscall: "fcntl64" ret: "int" args: "unsigned int" "unsigned int" "unsigned long" */
|
||||
#define LINUX_SYS_fcntl64 220
|
||||
|
||||
#define LINUX_SYS_MAXSYSCALL 221
|
||||
#define LINUX_SYS_MAXSYSCALL 210
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* $NetBSD: linux_syscallargs.h,v 1.6 2001/11/20 21:37:51 manu Exp $ */
|
||||
/* $NetBSD: linux_syscallargs.h,v 1.7 2002/02/15 16:48:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call argument lists.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.3 2001/10/06 13:32:59 manu Exp
|
||||
* created from NetBSD: syscalls.master,v 1.4 2001/11/20 21:37:51 manu Exp
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_SYS__SYSCALLARGS_H_
|
||||
|
@ -493,205 +493,3 @@ struct linux_sys_sigaltstack_args {
|
|||
syscallarg(const struct linux_sigaltstack *) ss;
|
||||
syscallarg(struct linux_sigaltstack *) oss;
|
||||
};
|
||||
|
||||
struct linux_sys_truncate64_args {
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(off_t) length;
|
||||
};
|
||||
|
||||
struct linux_sys_stat64_args {
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(struct linux_stat64 *) sp;
|
||||
};
|
||||
|
||||
struct linux_sys_lstat64_args {
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(struct linux_stat64 *) sp;
|
||||
};
|
||||
|
||||
struct linux_sys_fstat64_args {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(struct linux_stat64 *) sp;
|
||||
};
|
||||
|
||||
struct linux_sys_fcntl64_args {
|
||||
syscallarg(unsigned int) fd;
|
||||
syscallarg(unsigned int) cmd;
|
||||
syscallarg(unsigned long) arg;
|
||||
};
|
||||
|
||||
/*
|
||||
* System call prototypes.
|
||||
*/
|
||||
|
||||
int linux_sys_nosys(struct proc *, void *, register_t *);
|
||||
int sys_exit(struct proc *, void *, register_t *);
|
||||
int sys_fork(struct proc *, void *, register_t *);
|
||||
int sys_read(struct proc *, void *, register_t *);
|
||||
int sys_write(struct proc *, void *, register_t *);
|
||||
int linux_sys_open(struct proc *, void *, register_t *);
|
||||
int sys_close(struct proc *, void *, register_t *);
|
||||
int linux_sys_waitpid(struct proc *, void *, register_t *);
|
||||
int linux_sys_creat(struct proc *, void *, register_t *);
|
||||
int linux_sys_link(struct proc *, void *, register_t *);
|
||||
int linux_sys_unlink(struct proc *, void *, register_t *);
|
||||
int linux_sys_execve(struct proc *, void *, register_t *);
|
||||
int linux_sys_chdir(struct proc *, void *, register_t *);
|
||||
int linux_sys_time(struct proc *, void *, register_t *);
|
||||
int linux_sys_mknod(struct proc *, void *, register_t *);
|
||||
int linux_sys_chmod(struct proc *, void *, register_t *);
|
||||
int linux_sys_lchown(struct proc *, void *, register_t *);
|
||||
int compat_43_sys_lseek(struct proc *, void *, register_t *);
|
||||
int sys_getpid(struct proc *, void *, register_t *);
|
||||
int sys_setuid(struct proc *, void *, register_t *);
|
||||
int sys_getuid(struct proc *, void *, register_t *);
|
||||
int linux_sys_stime(struct proc *, void *, register_t *);
|
||||
int linux_sys_ptrace(struct proc *, void *, register_t *);
|
||||
int linux_sys_alarm(struct proc *, void *, register_t *);
|
||||
int linux_sys_pause(struct proc *, void *, register_t *);
|
||||
int linux_sys_utime(struct proc *, void *, register_t *);
|
||||
int linux_sys_access(struct proc *, void *, register_t *);
|
||||
int linux_sys_nice(struct proc *, void *, register_t *);
|
||||
int sys_sync(struct proc *, void *, register_t *);
|
||||
int linux_sys_kill(struct proc *, void *, register_t *);
|
||||
int linux_sys_rename(struct proc *, void *, register_t *);
|
||||
int linux_sys_mkdir(struct proc *, void *, register_t *);
|
||||
int linux_sys_rmdir(struct proc *, void *, register_t *);
|
||||
int sys_dup(struct proc *, void *, register_t *);
|
||||
int linux_sys_pipe(struct proc *, void *, register_t *);
|
||||
int linux_sys_times(struct proc *, void *, register_t *);
|
||||
int linux_sys_brk(struct proc *, void *, register_t *);
|
||||
int sys_setgid(struct proc *, void *, register_t *);
|
||||
int sys_getgid(struct proc *, void *, register_t *);
|
||||
int linux_sys_signal(struct proc *, void *, register_t *);
|
||||
int sys_geteuid(struct proc *, void *, register_t *);
|
||||
int sys_getegid(struct proc *, void *, register_t *);
|
||||
int sys_acct(struct proc *, void *, register_t *);
|
||||
int linux_sys_ioctl(struct proc *, void *, register_t *);
|
||||
int linux_sys_fcntl(struct proc *, void *, register_t *);
|
||||
int sys_setpgid(struct proc *, void *, register_t *);
|
||||
int linux_sys_olduname(struct proc *, void *, register_t *);
|
||||
int sys_umask(struct proc *, void *, register_t *);
|
||||
int sys_chroot(struct proc *, void *, register_t *);
|
||||
int sys_dup2(struct proc *, void *, register_t *);
|
||||
int sys_getppid(struct proc *, void *, register_t *);
|
||||
int sys_getpgrp(struct proc *, void *, register_t *);
|
||||
int sys_setsid(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigaction(struct proc *, void *, register_t *);
|
||||
int linux_sys_siggetmask(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigsetmask(struct proc *, void *, register_t *);
|
||||
int sys_setreuid(struct proc *, void *, register_t *);
|
||||
int sys_setregid(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigsuspend(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigpending(struct proc *, void *, register_t *);
|
||||
int compat_43_sys_sethostname(struct proc *, void *, register_t *);
|
||||
int compat_43_sys_setrlimit(struct proc *, void *, register_t *);
|
||||
int compat_43_sys_getrlimit(struct proc *, void *, register_t *);
|
||||
int sys_getrusage(struct proc *, void *, register_t *);
|
||||
int linux_sys_gettimeofday(struct proc *, void *, register_t *);
|
||||
int linux_sys_settimeofday(struct proc *, void *, register_t *);
|
||||
int sys_getgroups(struct proc *, void *, register_t *);
|
||||
int sys_setgroups(struct proc *, void *, register_t *);
|
||||
int linux_sys_symlink(struct proc *, void *, register_t *);
|
||||
int compat_43_sys_lstat(struct proc *, void *, register_t *);
|
||||
int linux_sys_readlink(struct proc *, void *, register_t *);
|
||||
int linux_sys_swapon(struct proc *, void *, register_t *);
|
||||
int linux_sys_reboot(struct proc *, void *, register_t *);
|
||||
int linux_sys_readdir(struct proc *, void *, register_t *);
|
||||
int linux_sys_mmap(struct proc *, void *, register_t *);
|
||||
int sys_munmap(struct proc *, void *, register_t *);
|
||||
int linux_sys_truncate(struct proc *, void *, register_t *);
|
||||
int compat_43_sys_ftruncate(struct proc *, void *, register_t *);
|
||||
int sys_fchmod(struct proc *, void *, register_t *);
|
||||
int sys___posix_fchown(struct proc *, void *, register_t *);
|
||||
int sys_getpriority(struct proc *, void *, register_t *);
|
||||
int sys_setpriority(struct proc *, void *, register_t *);
|
||||
int linux_sys_statfs(struct proc *, void *, register_t *);
|
||||
int linux_sys_fstatfs(struct proc *, void *, register_t *);
|
||||
int linux_sys_ioperm(struct proc *, void *, register_t *);
|
||||
int linux_sys_socketcall(struct proc *, void *, register_t *);
|
||||
int sys_setitimer(struct proc *, void *, register_t *);
|
||||
int sys_getitimer(struct proc *, void *, register_t *);
|
||||
int linux_sys_stat(struct proc *, void *, register_t *);
|
||||
int linux_sys_lstat(struct proc *, void *, register_t *);
|
||||
int linux_sys_fstat(struct proc *, void *, register_t *);
|
||||
int linux_sys_uname(struct proc *, void *, register_t *);
|
||||
int linux_sys_wait4(struct proc *, void *, register_t *);
|
||||
int linux_sys_swapoff(struct proc *, void *, register_t *);
|
||||
int linux_sys_sysinfo(struct proc *, void *, register_t *);
|
||||
int linux_sys_ipc(struct proc *, void *, register_t *);
|
||||
int sys_fsync(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigreturn(struct proc *, void *, register_t *);
|
||||
int linux_sys_clone(struct proc *, void *, register_t *);
|
||||
int linux_sys_setdomainname(struct proc *, void *, register_t *);
|
||||
int linux_sys_new_uname(struct proc *, void *, register_t *);
|
||||
int sys_mprotect(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigprocmask(struct proc *, void *, register_t *);
|
||||
int linux_sys_getpgid(struct proc *, void *, register_t *);
|
||||
int sys_fchdir(struct proc *, void *, register_t *);
|
||||
int linux_sys_personality(struct proc *, void *, register_t *);
|
||||
int linux_sys_setfsuid(struct proc *, void *, register_t *);
|
||||
int linux_sys_getfsuid(struct proc *, void *, register_t *);
|
||||
int linux_sys_llseek(struct proc *, void *, register_t *);
|
||||
int linux_sys_getdents(struct proc *, void *, register_t *);
|
||||
int linux_sys_select(struct proc *, void *, register_t *);
|
||||
int sys_flock(struct proc *, void *, register_t *);
|
||||
int linux_sys_msync(struct proc *, void *, register_t *);
|
||||
int sys_readv(struct proc *, void *, register_t *);
|
||||
int sys_writev(struct proc *, void *, register_t *);
|
||||
int linux_sys_cacheflush(struct proc *, void *, register_t *);
|
||||
int linux_sys_sysmips(struct proc *, void *, register_t *);
|
||||
int sys_getsid(struct proc *, void *, register_t *);
|
||||
int linux_sys_fdatasync(struct proc *, void *, register_t *);
|
||||
int linux_sys___sysctl(struct proc *, void *, register_t *);
|
||||
int sys_mlock(struct proc *, void *, register_t *);
|
||||
int sys_munlock(struct proc *, void *, register_t *);
|
||||
int sys_mlockall(struct proc *, void *, register_t *);
|
||||
int sys_munlockall(struct proc *, void *, register_t *);
|
||||
int linux_sys_sched_setparam(struct proc *, void *, register_t *);
|
||||
int linux_sys_sched_getparam(struct proc *, void *, register_t *);
|
||||
int linux_sys_sched_setscheduler(struct proc *, void *, register_t *);
|
||||
int linux_sys_sched_getscheduler(struct proc *, void *, register_t *);
|
||||
int linux_sys_sched_yield(struct proc *, void *, register_t *);
|
||||
int linux_sys_sched_get_priority_max(struct proc *, void *, register_t *);
|
||||
int linux_sys_sched_get_priority_min(struct proc *, void *, register_t *);
|
||||
int sys_nanosleep(struct proc *, void *, register_t *);
|
||||
int linux_sys_mremap(struct proc *, void *, register_t *);
|
||||
int linux_sys_accept(struct proc *, void *, register_t *);
|
||||
int linux_sys_bind(struct proc *, void *, register_t *);
|
||||
int linux_sys_connect(struct proc *, void *, register_t *);
|
||||
int linux_sys_getpeername(struct proc *, void *, register_t *);
|
||||
int linux_sys_getsockname(struct proc *, void *, register_t *);
|
||||
int linux_sys_getsockopt(struct proc *, void *, register_t *);
|
||||
int sys_listen(struct proc *, void *, register_t *);
|
||||
int linux_sys_recv(struct proc *, void *, register_t *);
|
||||
int linux_sys_recvfrom(struct proc *, void *, register_t *);
|
||||
int linux_sys_recvmsg(struct proc *, void *, register_t *);
|
||||
int linux_sys_send(struct proc *, void *, register_t *);
|
||||
int linux_sys_sendmsg(struct proc *, void *, register_t *);
|
||||
int linux_sys_sendto(struct proc *, void *, register_t *);
|
||||
int linux_sys_setsockopt(struct proc *, void *, register_t *);
|
||||
int linux_sys_socket(struct proc *, void *, register_t *);
|
||||
int linux_sys_socketpair(struct proc *, void *, register_t *);
|
||||
int linux_sys_setresuid(struct proc *, void *, register_t *);
|
||||
int linux_sys_getresuid(struct proc *, void *, register_t *);
|
||||
int sys_poll(struct proc *, void *, register_t *);
|
||||
int linux_sys_setresgid(struct proc *, void *, register_t *);
|
||||
int linux_sys_getresgid(struct proc *, void *, register_t *);
|
||||
int linux_sys_rt_sigreturn(struct proc *, void *, register_t *);
|
||||
int linux_sys_rt_sigaction(struct proc *, void *, register_t *);
|
||||
int linux_sys_rt_sigprocmask(struct proc *, void *, register_t *);
|
||||
int linux_sys_rt_sigpending(struct proc *, void *, register_t *);
|
||||
int linux_sys_rt_queueinfo(struct proc *, void *, register_t *);
|
||||
int linux_sys_rt_sigsuspend(struct proc *, void *, register_t *);
|
||||
int linux_sys_pread(struct proc *, void *, register_t *);
|
||||
int linux_sys_pwrite(struct proc *, void *, register_t *);
|
||||
int linux_sys_chown(struct proc *, void *, register_t *);
|
||||
int sys___getcwd(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigaltstack(struct proc *, void *, register_t *);
|
||||
int linux_sys_truncate64(struct proc *, void *, register_t *);
|
||||
int linux_sys_stat64(struct proc *, void *, register_t *);
|
||||
int linux_sys_lstat64(struct proc *, void *, register_t *);
|
||||
int linux_sys_fstat64(struct proc *, void *, register_t *);
|
||||
int linux_sys_fcntl64(struct proc *, void *, register_t *);
|
||||
#endif /* _LINUX_SYS__SYSCALLARGS_H_ */
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/* $NetBSD: linux_syscalls.c,v 1.6 2001/11/20 21:37:51 manu Exp $ */
|
||||
/* $NetBSD: linux_syscalls.c,v 1.7 2002/02/15 16:48:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call names.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.3 2001/10/06 13:32:59 manu Exp
|
||||
* created from NetBSD: syscalls.master,v 1.4 2001/11/20 21:37:51 manu Exp
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.6 2001/11/20 21:37:51 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.7 2002/02/15 16:48:01 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#if defined(_KERNEL_OPT)
|
||||
|
@ -28,228 +28,3 @@ __KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.6 2001/11/20 21:37:51 manu Exp
|
|||
#include <compat/linux/common/linux_mmap.h>
|
||||
#include <compat/linux/common/linux_socketcall.h>
|
||||
#include <compat/linux/linux_syscallargs.h>
|
||||
#endif /* _KERNEL_OPT */
|
||||
|
||||
const char *const linux_syscallnames[] = {
|
||||
"syscall", /* 0 = syscall */
|
||||
"exit", /* 1 = exit */
|
||||
"fork", /* 2 = fork */
|
||||
"read", /* 3 = read */
|
||||
"write", /* 4 = write */
|
||||
"open", /* 5 = open */
|
||||
"close", /* 6 = close */
|
||||
"waitpid", /* 7 = waitpid */
|
||||
"creat", /* 8 = creat */
|
||||
"link", /* 9 = link */
|
||||
"unlink", /* 10 = unlink */
|
||||
"execve", /* 11 = execve */
|
||||
"chdir", /* 12 = chdir */
|
||||
"time", /* 13 = time */
|
||||
"mknod", /* 14 = mknod */
|
||||
"chmod", /* 15 = chmod */
|
||||
"lchown", /* 16 = lchown */
|
||||
"#17 (unimplemented)", /* 17 = unimplemented */
|
||||
"#18 (obsolete ostat)", /* 18 = obsolete ostat */
|
||||
"lseek", /* 19 = lseek */
|
||||
"getpid", /* 20 = getpid */
|
||||
"#21 (unimplemented mount)", /* 21 = unimplemented mount */
|
||||
"#22 (obsolete umount)", /* 22 = obsolete umount */
|
||||
"setuid", /* 23 = setuid */
|
||||
"getuid", /* 24 = getuid */
|
||||
"stime", /* 25 = stime */
|
||||
"ptrace", /* 26 = ptrace */
|
||||
"alarm", /* 27 = alarm */
|
||||
"#28 (obsolete ofstat)", /* 28 = obsolete ofstat */
|
||||
"pause", /* 29 = pause */
|
||||
"utime", /* 30 = utime */
|
||||
"#31 (unimplemented)", /* 31 = unimplemented */
|
||||
"#32 (unimplemented)", /* 32 = unimplemented */
|
||||
"access", /* 33 = access */
|
||||
"nice", /* 34 = nice */
|
||||
"#35 (unimplemented)", /* 35 = unimplemented */
|
||||
"sync", /* 36 = sync */
|
||||
"kill", /* 37 = kill */
|
||||
"rename", /* 38 = rename */
|
||||
"mkdir", /* 39 = mkdir */
|
||||
"rmdir", /* 40 = rmdir */
|
||||
"dup", /* 41 = dup */
|
||||
"pipe", /* 42 = pipe */
|
||||
"times", /* 43 = times */
|
||||
"#44 (unimplemented)", /* 44 = unimplemented */
|
||||
"brk", /* 45 = brk */
|
||||
"setgid", /* 46 = setgid */
|
||||
"getgid", /* 47 = getgid */
|
||||
"signal", /* 48 = signal */
|
||||
"geteuid", /* 49 = geteuid */
|
||||
"getegid", /* 50 = getegid */
|
||||
"acct", /* 51 = acct */
|
||||
"#52 (unimplemented umount)", /* 52 = unimplemented umount */
|
||||
"#53 (unimplemented)", /* 53 = unimplemented */
|
||||
"ioctl", /* 54 = ioctl */
|
||||
"fcntl", /* 55 = fcntl */
|
||||
"#56 (obsolete mpx)", /* 56 = obsolete mpx */
|
||||
"setpgid", /* 57 = setpgid */
|
||||
"#58 (unimplemented)", /* 58 = unimplemented */
|
||||
"olduname", /* 59 = olduname */
|
||||
"umask", /* 60 = umask */
|
||||
"chroot", /* 61 = chroot */
|
||||
"#62 (unimplemented ustat)", /* 62 = unimplemented ustat */
|
||||
"dup2", /* 63 = dup2 */
|
||||
"getppid", /* 64 = getppid */
|
||||
"getpgrp", /* 65 = getpgrp */
|
||||
"setsid", /* 66 = setsid */
|
||||
"sigaction", /* 67 = sigaction */
|
||||
"siggetmask", /* 68 = siggetmask */
|
||||
"sigsetmask", /* 69 = sigsetmask */
|
||||
"setreuid", /* 70 = setreuid */
|
||||
"setregid", /* 71 = setregid */
|
||||
"sigsuspend", /* 72 = sigsuspend */
|
||||
"sigpending", /* 73 = sigpending */
|
||||
"sethostname", /* 74 = sethostname */
|
||||
"setrlimit", /* 75 = setrlimit */
|
||||
"getrlimit", /* 76 = getrlimit */
|
||||
"getrusage", /* 77 = getrusage */
|
||||
"gettimeofday", /* 78 = gettimeofday */
|
||||
"settimeofday", /* 79 = settimeofday */
|
||||
"getgroups", /* 80 = getgroups */
|
||||
"setgroups", /* 81 = setgroups */
|
||||
"#82 (unimplemented old_select)", /* 82 = unimplemented old_select */
|
||||
"symlink", /* 83 = symlink */
|
||||
"oolstat", /* 84 = oolstat */
|
||||
"readlink", /* 85 = readlink */
|
||||
"#86 (unimplemented uselib)", /* 86 = unimplemented uselib */
|
||||
"swapon", /* 87 = swapon */
|
||||
"reboot", /* 88 = reboot */
|
||||
"readdir", /* 89 = readdir */
|
||||
"mmap", /* 90 = mmap */
|
||||
"munmap", /* 91 = munmap */
|
||||
"truncate", /* 92 = truncate */
|
||||
"ftruncate", /* 93 = ftruncate */
|
||||
"fchmod", /* 94 = fchmod */
|
||||
"__posix_fchown", /* 95 = __posix_fchown */
|
||||
"getpriority", /* 96 = getpriority */
|
||||
"setpriority", /* 97 = setpriority */
|
||||
"#98 (unimplemented)", /* 98 = unimplemented */
|
||||
"statfs", /* 99 = statfs */
|
||||
"fstatfs", /* 100 = fstatfs */
|
||||
"ioperm", /* 101 = ioperm */
|
||||
"socketcall", /* 102 = socketcall */
|
||||
"#103 (unimplemented syslog)", /* 103 = unimplemented syslog */
|
||||
"setitimer", /* 104 = setitimer */
|
||||
"getitimer", /* 105 = getitimer */
|
||||
"stat", /* 106 = stat */
|
||||
"lstat", /* 107 = lstat */
|
||||
"fstat", /* 108 = fstat */
|
||||
"uname", /* 109 = uname */
|
||||
"#110 (unimplemented iopl)", /* 110 = unimplemented iopl */
|
||||
"#111 (unimplemented vhangup)", /* 111 = unimplemented vhangup */
|
||||
"#112 (unimplemented idle)", /* 112 = unimplemented idle */
|
||||
"#113 (unimplemented vm86old)", /* 113 = unimplemented vm86old */
|
||||
"wait4", /* 114 = wait4 */
|
||||
"swapoff", /* 115 = swapoff */
|
||||
"sysinfo", /* 116 = sysinfo */
|
||||
"ipc", /* 117 = ipc */
|
||||
"fsync", /* 118 = fsync */
|
||||
"sigreturn", /* 119 = sigreturn */
|
||||
"clone", /* 120 = clone */
|
||||
"setdomainname", /* 121 = setdomainname */
|
||||
"new_uname", /* 122 = new_uname */
|
||||
"#123 (unimplemented modify_ldt)", /* 123 = unimplemented modify_ldt */
|
||||
"#124 (unimplemented adjtimex)", /* 124 = unimplemented adjtimex */
|
||||
"mprotect", /* 125 = mprotect */
|
||||
"sigprocmask", /* 126 = sigprocmask */
|
||||
"#127 (unimplemented create_module)", /* 127 = unimplemented create_module */
|
||||
"#128 (unimplemented init_module)", /* 128 = unimplemented init_module */
|
||||
"#129 (unimplemented delete_module)", /* 129 = unimplemented delete_module */
|
||||
"#130 (unimplemented get_kernel_syms)", /* 130 = unimplemented get_kernel_syms */
|
||||
"#131 (unimplemented quotactl)", /* 131 = unimplemented quotactl */
|
||||
"getpgid", /* 132 = getpgid */
|
||||
"fchdir", /* 133 = fchdir */
|
||||
"#134 (unimplemented bdflush)", /* 134 = unimplemented bdflush */
|
||||
"#135 (unimplemented sysfs)", /* 135 = unimplemented sysfs */
|
||||
"personality", /* 136 = personality */
|
||||
"#137 (unimplemented afs_syscall)", /* 137 = unimplemented afs_syscall */
|
||||
"setfsuid", /* 138 = setfsuid */
|
||||
"getfsuid", /* 139 = getfsuid */
|
||||
"llseek", /* 140 = llseek */
|
||||
"getdents", /* 141 = getdents */
|
||||
"select", /* 142 = select */
|
||||
"flock", /* 143 = flock */
|
||||
"msync", /* 144 = msync */
|
||||
"readv", /* 145 = readv */
|
||||
"writev", /* 146 = writev */
|
||||
"cacheflush", /* 147 = cacheflush */
|
||||
"#148 (unimplemented cachectl)", /* 148 = unimplemented cachectl */
|
||||
"sysmips", /* 149 = sysmips */
|
||||
"#150 (unimplemented)", /* 150 = unimplemented */
|
||||
"getsid", /* 151 = getsid */
|
||||
"fdatasync", /* 152 = fdatasync */
|
||||
"__sysctl", /* 153 = __sysctl */
|
||||
"mlock", /* 154 = mlock */
|
||||
"munlock", /* 155 = munlock */
|
||||
"mlockall", /* 156 = mlockall */
|
||||
"munlockall", /* 157 = munlockall */
|
||||
"sched_setparam", /* 158 = sched_setparam */
|
||||
"sched_getparam", /* 159 = sched_getparam */
|
||||
"sched_setscheduler", /* 160 = sched_setscheduler */
|
||||
"sched_getscheduler", /* 161 = sched_getscheduler */
|
||||
"sched_yield", /* 162 = sched_yield */
|
||||
"sched_get_priority_max", /* 163 = sched_get_priority_max */
|
||||
"sched_get_priority_min", /* 164 = sched_get_priority_min */
|
||||
"#165 (unimplemented sched_rr_get_interval)", /* 165 = unimplemented sched_rr_get_interval */
|
||||
"nanosleep", /* 166 = nanosleep */
|
||||
"mremap", /* 167 = mremap */
|
||||
"accept", /* 168 = accept */
|
||||
"bind", /* 169 = bind */
|
||||
"connect", /* 170 = connect */
|
||||
"getpeername", /* 171 = getpeername */
|
||||
"getsockname", /* 172 = getsockname */
|
||||
"getsockopt", /* 173 = getsockopt */
|
||||
"listen", /* 174 = listen */
|
||||
"recv", /* 175 = recv */
|
||||
"recvfrom", /* 176 = recvfrom */
|
||||
"recvmsg", /* 177 = recvmsg */
|
||||
"send", /* 178 = send */
|
||||
"sendmsg", /* 179 = sendmsg */
|
||||
"sendto", /* 180 = sendto */
|
||||
"setsockopt", /* 181 = setsockopt */
|
||||
"#182 (unimplemented shutdown)", /* 182 = unimplemented shutdown */
|
||||
"socket", /* 183 = socket */
|
||||
"socketpair", /* 184 = socketpair */
|
||||
"setresuid", /* 185 = setresuid */
|
||||
"getresuid", /* 186 = getresuid */
|
||||
"#187 (unimplemented query_module)", /* 187 = unimplemented query_module */
|
||||
"poll", /* 188 = poll */
|
||||
"#189 (unimplemented nfsservctl)", /* 189 = unimplemented nfsservctl */
|
||||
"setresgid", /* 190 = setresgid */
|
||||
"getresgid", /* 191 = getresgid */
|
||||
"#192 (unimplemented prctl)", /* 192 = unimplemented prctl */
|
||||
"rt_sigreturn", /* 193 = rt_sigreturn */
|
||||
"rt_sigaction", /* 194 = rt_sigaction */
|
||||
"rt_sigprocmask", /* 195 = rt_sigprocmask */
|
||||
"rt_sigpending", /* 196 = rt_sigpending */
|
||||
"#197 (unimplemented rt_sigtimedwait)", /* 197 = unimplemented rt_sigtimedwait */
|
||||
"rt_queueinfo", /* 198 = rt_queueinfo */
|
||||
"rt_sigsuspend", /* 199 = rt_sigsuspend */
|
||||
"pread", /* 200 = pread */
|
||||
"pwrite", /* 201 = pwrite */
|
||||
"chown", /* 202 = chown */
|
||||
"__getcwd", /* 203 = __getcwd */
|
||||
"#204 (unimplemented capget)", /* 204 = unimplemented capget */
|
||||
"#205 (unimplemented capset)", /* 205 = unimplemented capset */
|
||||
"sigaltstack", /* 206 = sigaltstack */
|
||||
"#207 (unimplemented sendfile)", /* 207 = unimplemented sendfile */
|
||||
"#208 (unimplemented)", /* 208 = unimplemented */
|
||||
"#209 (unimplemented)", /* 209 = unimplemented */
|
||||
"#210 (unimplemented mmap2)", /* 210 = unimplemented mmap2 */
|
||||
"truncate64", /* 211 = truncate64 */
|
||||
"#212 (unimplemented ftruncate64)", /* 212 = unimplemented ftruncate64 */
|
||||
"stat64", /* 213 = stat64 */
|
||||
"lstat64", /* 214 = lstat64 */
|
||||
"fstat64", /* 215 = fstat64 */
|
||||
"#216 (unimplemented pivot_root)", /* 216 = unimplemented pivot_root */
|
||||
"#217 (unimplemented mincore)", /* 217 = unimplemented mincore */
|
||||
"#218 (unimplemented modvise)", /* 218 = unimplemented modvise */
|
||||
"#219 (unimplemented getdents64)", /* 219 = unimplemented getdents64 */
|
||||
"fcntl64", /* 220 = fcntl64 */
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.4 2001/11/20 21:37:51 manu Exp $
|
||||
$NetBSD: syscalls.master,v 1.5 2002/02/15 16:48:01 christos Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
|
@ -363,17 +363,20 @@
|
|||
struct linux_sigaltstack *oss); }
|
||||
207 UNIMPL sendfile
|
||||
208 UNIMPL
|
||||
209 UNIMPL
|
||||
210 UNIMPL mmap2
|
||||
/* XXX: wrong? */
|
||||
209 NOARGS { int linux_sys_ugetrlimit(int which, \
|
||||
struct rlimit *rlp); }
|
||||
210 STD { off_t linux_sys_mmap2(void *addr, size_t len, \
|
||||
int prot, int flags, int fd, off_t offset); }
|
||||
211 STD { int linux_sys_truncate64(const char *path, \
|
||||
off_t length); }
|
||||
212 UNIMPL ftruncate64
|
||||
213 STD { int linux_sys_stat64(const char *path, \
|
||||
struct linux_stat64 *sp); }
|
||||
struct linux_stat64 *sp); }
|
||||
214 STD { int linux_sys_lstat64(const char *path, \
|
||||
struct linux_stat64 *sp); }
|
||||
struct linux_stat64 *sp); }
|
||||
215 STD { int linux_sys_fstat64(int fd, \
|
||||
struct linux_stat64 *sp); }
|
||||
struct linux_stat64 *sp); }
|
||||
216 UNIMPL pivot_root
|
||||
217 UNIMPL mincore
|
||||
218 UNIMPL modvise
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.c,v 1.12 2001/11/13 02:08:46 lukem Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.13 2002/02/15 16:48:02 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.12 2001/11/13 02:08:46 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.13 2002/02/15 16:48:02 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -169,7 +169,7 @@ linux_sendsig(catcher, sig, mask, code) /* XXX Check me */
|
|||
memset(&sc, 0, sizeof sc);
|
||||
sc.lsignal = (int)native_to_linux_sig[sig];
|
||||
sc.lhandler = (unsigned long)catcher;
|
||||
native_to_linux_old_extra_sigset(mask, &sc.lmask, &sc._unused[3]);
|
||||
native_to_linux_old_extra_sigset(&sc.lmask, &sc._unused[3], mask);
|
||||
sc.lregs = (struct linux_pt_regs*)fp;
|
||||
|
||||
/*
|
||||
|
@ -351,7 +351,7 @@ linux_sys_rt_sigreturn(p, v, retval)
|
|||
/*
|
||||
* Grab the signal mask
|
||||
*/
|
||||
linux_to_native_sigset(&sigframe.luc.luc_sigmask, &mask);
|
||||
linux_to_native_sigset(&mask, &sigframe.luc.luc_sigmask);
|
||||
(void) sigprocmask1(p, SIG_SETMASK, &mask, 0);
|
||||
|
||||
return (EJUSTRETURN);
|
||||
|
@ -438,9 +438,8 @@ linux_sys_sigreturn(p, v, retval)
|
|||
p->p_sigctx.ps_sigstk.ss_flags &= ~SS_ONSTACK;
|
||||
|
||||
/* Restore signal mask. */
|
||||
linux_old_extra_to_native_sigset(&context.lmask,
|
||||
&context._unused[3],
|
||||
&mask);
|
||||
linux_old_extra_to_native_sigset(&mask, &context.lmask,
|
||||
&context._unused[3]);
|
||||
(void) sigprocmask1(p, SIG_SETMASK, &mask, 0);
|
||||
|
||||
return (EJUSTRETURN);
|
||||
|
@ -469,8 +468,9 @@ linux_sys_modify_ldt(p, v, retval)
|
|||
* major device numbers remapping
|
||||
*/
|
||||
dev_t
|
||||
linux_fakedev(dev)
|
||||
linux_fakedev(dev, raw)
|
||||
dev_t dev;
|
||||
int raw;
|
||||
{
|
||||
/* XXX write me */
|
||||
return dev;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.h,v 1.3 2001/05/27 21:11:12 manu Exp $ */
|
||||
/* $NetBSD: linux_machdep.h,v 1.4 2002/02/15 16:48:02 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -40,6 +40,7 @@
|
|||
#define _POWERPC_LINUX_MACHDEP_H
|
||||
|
||||
#include <compat/linux/common/linux_signal.h>
|
||||
|
||||
/*
|
||||
* From Linux's include/asm-ppc/ptrace.h
|
||||
* Needed for sigcontext
|
||||
|
@ -162,13 +163,6 @@ struct linux_rt_sigframe
|
|||
struct linux_ucontext luc;
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
__BEGIN_DECLS
|
||||
void linux_sendsig __P((sig_t, int, sigset_t *, u_long));
|
||||
dev_t linux_fakedev __P((dev_t));
|
||||
__END_DECLS
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* Major device numbers of VT device on both Linux and NetBSD. Used in
|
||||
* ugly patch to fake device numbers.
|
||||
|
@ -240,4 +234,5 @@ void linux_syscall_intern __P((struct proc *));
|
|||
__END_DECLS
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
|
||||
#endif /* _POWERPC_LINUX_MACHDEP_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscall.h,v 1.11 2001/11/13 02:08:46 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscall.h,v 1.12 2002/02/15 16:48:02 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call numbers.
|
||||
|
@ -471,4 +471,7 @@
|
|||
/* syscall: "__vfork14" ret: "int" args: */
|
||||
#define LINUX_SYS___vfork14 189
|
||||
|
||||
/* syscall: "mmap2" ret: "off_t" args: "void *" "size_t" "int" "int" "int" "off_t" */
|
||||
#define LINUX_SYS_mmap2 192
|
||||
|
||||
#define LINUX_SYS_MAXSYSCALL 207
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscallargs.h,v 1.11 2001/11/13 02:08:47 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscallargs.h,v 1.12 2002/02/15 16:48:02 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call argument lists.
|
||||
|
@ -493,6 +493,15 @@ struct linux_sys_sigaltstack_args {
|
|||
syscallarg(struct linux_sigaltstack *) oss;
|
||||
};
|
||||
|
||||
struct linux_sys_mmap2_args {
|
||||
syscallarg(void *) addr;
|
||||
syscallarg(size_t) len;
|
||||
syscallarg(int) prot;
|
||||
syscallarg(int) flags;
|
||||
syscallarg(int) fd;
|
||||
syscallarg(off_t) offset;
|
||||
};
|
||||
|
||||
/*
|
||||
* System call prototypes.
|
||||
*/
|
||||
|
@ -648,4 +657,5 @@ int linux_sys_chown(struct proc *, void *, register_t *);
|
|||
int sys___getcwd(struct proc *, void *, register_t *);
|
||||
int linux_sys_sigaltstack(struct proc *, void *, register_t *);
|
||||
int sys___vfork14(struct proc *, void *, register_t *);
|
||||
int linux_sys_mmap2(struct proc *, void *, register_t *);
|
||||
#endif /* _LINUX_SYS__SYSCALLARGS_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_syscalls.c,v 1.11 2001/11/13 02:08:47 lukem Exp $ */
|
||||
/* $NetBSD: linux_syscalls.c,v 1.12 2002/02/15 16:48:02 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call names.
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.11 2001/11/13 02:08:47 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.12 2002/02/15 16:48:02 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#if defined(_KERNEL_OPT)
|
||||
|
@ -222,7 +222,7 @@ const char *const linux_syscallnames[] = {
|
|||
"__vfork14", /* 189 = __vfork14 */
|
||||
"#190 (unimplemented sys_getrlimit)", /* 190 = unimplemented sys_getrlimit */
|
||||
"#191 (unimplemented / * unused * /)", /* 191 = unimplemented / * unused * / */
|
||||
"#192 (unimplemented mmap2)", /* 192 = unimplemented mmap2 */
|
||||
"mmap2", /* 192 = mmap2 */
|
||||
"#193 (unimplemented truncate64)", /* 193 = unimplemented truncate64 */
|
||||
"#194 (unimplemented ftruncate64)", /* 194 = unimplemented ftruncate64 */
|
||||
"#195 (unimplemented stat64)", /* 195 = unimplemented stat64 */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_sysent.c,v 1.11 2001/11/13 02:08:47 lukem Exp $ */
|
||||
/* $NetBSD: linux_sysent.c,v 1.12 2002/02/15 16:48:02 christos Exp $ */
|
||||
|
||||
/*
|
||||
* System call switch table.
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.11 2001/11/13 02:08:47 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.12 2002/02/15 16:48:02 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -414,8 +414,8 @@ struct sysent linux_sysent[] = {
|
|||
linux_sys_nosys }, /* 190 = unimplemented sys_getrlimit */
|
||||
{ 0, 0, 0,
|
||||
linux_sys_nosys }, /* 191 = unimplemented / * unused * / */
|
||||
{ 0, 0, 0,
|
||||
linux_sys_nosys }, /* 192 = unimplemented mmap2 */
|
||||
{ 6, s(struct linux_sys_mmap2_args), 0,
|
||||
linux_sys_mmap2 }, /* 192 = mmap2 */
|
||||
{ 0, 0, 0,
|
||||
linux_sys_nosys }, /* 193 = unimplemented truncate64 */
|
||||
{ 0, 0, 0,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.7 2001/09/08 07:09:44 manu Exp $
|
||||
$NetBSD: syscalls.master,v 1.8 2002/02/15 16:48:02 christos Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
|
@ -348,9 +348,11 @@
|
|||
187 UNIMPL getpmsg
|
||||
188 UNIMPL putpmsg
|
||||
189 NOARGS { int sys___vfork14(void); }
|
||||
190 UNIMPL sys_getrlimit
|
||||
190 STD { int linux_sys_ugetrlimit(int which, \
|
||||
struct rlimit *rlp); }
|
||||
191 UNIMPL /* unused */
|
||||
192 UNIMPL mmap2
|
||||
192 STD { off_t linux_sys_mmap2(void *addr, size_t len, \
|
||||
int prot, int flags, int fd, off_t offset); }
|
||||
193 UNIMPL truncate64
|
||||
194 UNIMPL ftruncate64
|
||||
195 UNIMPL stat64
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_emuldata.h,v 1.3 2001/03/15 19:18:20 manu Exp $ */
|
||||
/* $NetBSD: linux_emuldata.h,v 1.4 2002/02/15 16:48:02 christos Exp $ */
|
||||
|
||||
#ifndef _COMMON_LINUX_EMULDATA_H
|
||||
#define _COMMON_LINUX_EMULDATA_H
|
||||
|
@ -11,10 +11,10 @@
|
|||
*/
|
||||
struct linux_emuldata {
|
||||
#if notyet
|
||||
sigset_t ps_siginfo; /* Which signals have a RT handler */
|
||||
sigset_t ps_siginfo; /* Which signals have a RT handler */
|
||||
#endif
|
||||
int debugreg[8]; /* GDB information for ptrace - for use, */
|
||||
/* see ../arch/i386/linux_ptrace.c */
|
||||
caddr_t p_break; /* Processes' idea of break */
|
||||
int debugreg[8]; /* GDB information for ptrace - for use, */
|
||||
/* see ../arch/i386/linux_ptrace.c */
|
||||
caddr_t p_break; /* Processes' idea of break */
|
||||
};
|
||||
#endif /* !_COMMON_LINUX_EMULDATA_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_file.c,v 1.44 2002/01/14 23:14:42 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_file.c,v 1.45 2002/02/15 16:48:02 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -42,7 +42,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.44 2002/01/14 23:14:42 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.45 2002/02/15 16:48:02 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -473,7 +473,7 @@ bsd_to_linux_stat(bsp, lsp)
|
|||
struct linux_stat *lsp;
|
||||
{
|
||||
|
||||
lsp->lst_dev = bsp->st_dev;
|
||||
lsp->lst_dev = linux_fakedev(bsp->st_dev, 0);
|
||||
lsp->lst_ino = bsp->st_ino;
|
||||
lsp->lst_mode = (linux_mode_t)bsp->st_mode;
|
||||
if (bsp->st_nlink >= (1 << 15))
|
||||
|
@ -482,7 +482,7 @@ bsd_to_linux_stat(bsp, lsp)
|
|||
lsp->lst_nlink = (linux_nlink_t)bsp->st_nlink;
|
||||
lsp->lst_uid = bsp->st_uid;
|
||||
lsp->lst_gid = bsp->st_gid;
|
||||
lsp->lst_rdev = linux_fakedev(bsp->st_rdev);
|
||||
lsp->lst_rdev = linux_fakedev(bsp->st_rdev, 1);
|
||||
lsp->lst_size = bsp->st_size;
|
||||
lsp->lst_blksize = bsp->st_blksize;
|
||||
lsp->lst_blocks = bsp->st_blocks;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_file64.c,v 1.6 2001/11/13 02:08:52 lukem Exp $ */
|
||||
/* $NetBSD: linux_file64.c,v 1.7 2002/02/15 16:48:02 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.6 2001/11/13 02:08:52 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.7 2002/02/15 16:48:02 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -84,7 +84,7 @@ bsd_to_linux_stat(bsp, lsp)
|
|||
struct stat *bsp;
|
||||
struct linux_stat64 *lsp;
|
||||
{
|
||||
lsp->lst_dev = bsp->st_dev;
|
||||
lsp->lst_dev = linux_fakedev(bsp->st_dev, 0);
|
||||
lsp->lst_ino = bsp->st_ino;
|
||||
lsp->lst_mode = (linux_mode_t)bsp->st_mode;
|
||||
if (bsp->st_nlink >= (1 << 15))
|
||||
|
@ -93,13 +93,14 @@ bsd_to_linux_stat(bsp, lsp)
|
|||
lsp->lst_nlink = (linux_nlink_t)bsp->st_nlink;
|
||||
lsp->lst_uid = bsp->st_uid;
|
||||
lsp->lst_gid = bsp->st_gid;
|
||||
lsp->lst_rdev = linux_fakedev(bsp->st_rdev);
|
||||
lsp->lst_rdev = linux_fakedev(bsp->st_rdev, 1);
|
||||
lsp->lst_size = bsp->st_size;
|
||||
lsp->lst_blksize = bsp->st_blksize;
|
||||
lsp->lst_blocks = bsp->st_blocks;
|
||||
lsp->lst_atime = bsp->st_atime;
|
||||
lsp->lst_mtime = bsp->st_mtime;
|
||||
lsp->lst_ctime = bsp->st_ctime;
|
||||
lsp->lst_ino64 = bsp->st_ino;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_machdep.h,v 1.5 2002/01/14 23:14:43 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_machdep.h,v 1.6 2002/02/15 16:48:02 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -55,4 +55,11 @@
|
|||
#error Undefined linux_machdep.h machine type.
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
__BEGIN_DECLS
|
||||
void linux_sendsig __P((sig_t, int, sigset_t *, u_long));
|
||||
dev_t linux_fakedev __P((dev_t, int));
|
||||
__END_DECLS
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
#endif /* !_LINUX_MACHDEP_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_misc.c,v 1.96 2001/12/09 03:07:43 chs Exp $ */
|
||||
/* $NetBSD: linux_misc.c,v 1.97 2002/02/15 16:48:02 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -64,7 +64,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.96 2001/12/09 03:07:43 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.97 2002/02/15 16:48:02 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -133,6 +133,7 @@ const int linux_ptrace_request_map[] = {
|
|||
|
||||
/* Local linux_misc.c functions: */
|
||||
static void bsd_to_linux_statfs __P((struct statfs *, struct linux_statfs *));
|
||||
static int linux_to_bsd_limit __P((int));
|
||||
|
||||
/*
|
||||
* The information on a terminated (or stopped) process needs
|
||||
|
@ -345,8 +346,8 @@ linux_sys_fstatfs(p, v, retval)
|
|||
}
|
||||
|
||||
char linux_sysname[] = "Linux";
|
||||
char linux_release[] = "2.0.38";
|
||||
char linux_version[] = "#0 Sun Apr 1 11:11:11 MET 2000";
|
||||
char linux_release[] = "2.4.18";
|
||||
char linux_version[] = "#13 SMP Thu Feb 14 13:13:13 EST 2002";
|
||||
|
||||
/*
|
||||
* uname(). Just copy the info from the various strings stored in the
|
||||
|
@ -419,6 +420,45 @@ linux_sys_mmap(p, v, retval)
|
|||
return sys_mmap(p, &cma, retval);
|
||||
}
|
||||
|
||||
/*
|
||||
* Newer type Linux mmap call.
|
||||
*/
|
||||
int
|
||||
linux_sys_mmap2(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct linux_sys_mmap2_args /* {
|
||||
syscallarg(void *) addr;
|
||||
syscallarg(size_t) len;
|
||||
syscallarg(int) prot;
|
||||
syscallarg(int) flags;
|
||||
syscallarg(int) fd;
|
||||
syscallarg(off_t) offset;
|
||||
} */ *uap = v;
|
||||
struct sys_mmap_args cma;
|
||||
int flags;
|
||||
|
||||
flags = 0;
|
||||
flags |= cvtto_bsd_mask(SCARG(uap,flags), LINUX_MAP_SHARED, MAP_SHARED);
|
||||
flags |= cvtto_bsd_mask(SCARG(uap,flags), LINUX_MAP_PRIVATE, MAP_PRIVATE);
|
||||
flags |= cvtto_bsd_mask(SCARG(uap,flags), LINUX_MAP_FIXED, MAP_FIXED);
|
||||
flags |= cvtto_bsd_mask(SCARG(uap,flags), LINUX_MAP_ANON, MAP_ANON);
|
||||
/* XXX XAX ERH: Any other flags here? There are more defined... */
|
||||
|
||||
SCARG(&cma,addr) = (void *)SCARG(uap, addr);
|
||||
SCARG(&cma,len) = SCARG(uap, len);
|
||||
SCARG(&cma,prot) = SCARG(uap, prot);
|
||||
if (SCARG(&cma,prot) & VM_PROT_WRITE) /* XXX */
|
||||
SCARG(&cma,prot) |= VM_PROT_READ;
|
||||
SCARG(&cma,flags) = flags;
|
||||
SCARG(&cma,fd) = flags & MAP_ANON ? -1 : SCARG(uap, fd);
|
||||
SCARG(&cma,pos) = (off_t)SCARG(uap, offset);
|
||||
|
||||
return sys_mmap(p, &cma, retval);
|
||||
}
|
||||
|
||||
int
|
||||
linux_sys_mremap(p, v, retval)
|
||||
struct proc *p;
|
||||
|
@ -1086,31 +1126,6 @@ linux_sys_getfsuid(p, v, retval)
|
|||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
linux_sys___sysctl(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct linux_sys___sysctl_args /* {
|
||||
syscallarg(struct linux___sysctl *) lsp;
|
||||
} */ *uap = v;
|
||||
struct linux___sysctl ls;
|
||||
struct sys___sysctl_args bsa;
|
||||
int error;
|
||||
|
||||
if ((error = copyin(SCARG(uap, lsp), &ls, sizeof ls)))
|
||||
return error;
|
||||
SCARG(&bsa, name) = ls.name;
|
||||
SCARG(&bsa, namelen) = ls.namelen;
|
||||
SCARG(&bsa, old) = ls.old;
|
||||
SCARG(&bsa, oldlenp) = ls.oldlenp;
|
||||
SCARG(&bsa, new) = ls.new;
|
||||
SCARG(&bsa, newlen) = ls.newlen;
|
||||
|
||||
return sys___sysctl(p, &bsa, retval);
|
||||
}
|
||||
|
||||
int
|
||||
linux_sys_setresuid(p, v, retval)
|
||||
struct proc *p;
|
||||
|
@ -1423,6 +1438,116 @@ linux_sys_sysinfo(p, v, retval)
|
|||
return (copyout(&si, SCARG(uap, arg), sizeof si));
|
||||
}
|
||||
|
||||
#define bsd_to_linux_rlimit1(l, b, f) \
|
||||
(l)->f = ((b)->f == RLIM_INFINITY || ((b)->f & 0xffffffff00000000) != 0) ? \
|
||||
LINUX_RLIM_INFINITY : (int32_t)(b)->f
|
||||
#define bsd_to_linux_rlimit(l, b) \
|
||||
bsd_to_linux_rlimit1(l, b, rlim_cur); \
|
||||
bsd_to_linux_rlimit1(l, b, rlim_max)
|
||||
|
||||
#define linux_to_bsd_rlimit1(b, l, f) \
|
||||
(b)->f = (l)->f == LINUX_RLIM_INFINITY ? RLIM_INFINITY : (b)->f
|
||||
#define linux_to_bsd_rlimit(b, l) \
|
||||
linux_to_bsd_rlimit1(b, l, rlim_cur); \
|
||||
linux_to_bsd_rlimit1(b, l, rlim_max)
|
||||
|
||||
static int
|
||||
linux_to_bsd_limit(lim)
|
||||
int lim;
|
||||
{
|
||||
switch (lim) {
|
||||
case LINUX_RLIMIT_CPU:
|
||||
return RLIMIT_CPU;
|
||||
case LINUX_RLIMIT_FSIZE:
|
||||
return RLIMIT_FSIZE;
|
||||
case LINUX_RLIMIT_DATA:
|
||||
return RLIMIT_DATA;
|
||||
case LINUX_RLIMIT_STACK:
|
||||
return RLIMIT_STACK;
|
||||
case LINUX_RLIMIT_CORE:
|
||||
return RLIMIT_CORE;
|
||||
case LINUX_RLIMIT_RSS:
|
||||
return RLIMIT_RSS;
|
||||
case LINUX_RLIMIT_NPROC:
|
||||
return RLIMIT_NPROC;
|
||||
case LINUX_RLIMIT_NOFILE:
|
||||
return RLIMIT_NOFILE;
|
||||
case LINUX_RLIMIT_MEMLOCK:
|
||||
return RLIMIT_MEMLOCK;
|
||||
case LINUX_RLIMIT_AS:
|
||||
case LINUX_RLIMIT_LOCKS:
|
||||
return -EOPNOTSUPP;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
linux_sys_getrlimit(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct linux_sys_getrlimit_args /* {
|
||||
syscallarg(int) which;
|
||||
syscallarg(struct orlimit *) rlp;
|
||||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
struct sys_getrlimit_args ap;
|
||||
struct rlimit rl;
|
||||
struct orlimit orl;
|
||||
int error;
|
||||
|
||||
SCARG(&ap, which) = linux_to_bsd_limit(SCARG(uap, which));
|
||||
if ((error = SCARG(&ap, which)) < 0)
|
||||
return -error;
|
||||
SCARG(&ap, rlp) = stackgap_alloc(&sg, sizeof rl);
|
||||
if ((error = sys_getrlimit(p, &ap, retval)) != 0)
|
||||
return error;
|
||||
if ((error = copyin(SCARG(&ap, rlp), &rl, sizeof(rl))) != 0)
|
||||
return error;
|
||||
bsd_to_linux_rlimit(&orl, &rl);
|
||||
return copyout(&orl, SCARG(uap, rlp), sizeof(orl));
|
||||
}
|
||||
|
||||
int
|
||||
linux_sys_setrlimit(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct linux_sys_setrlimit_args /* {
|
||||
syscallarg(int) which;
|
||||
syscallarg(struct orlimit *) rlp;
|
||||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
struct sys_setrlimit_args ap;
|
||||
struct rlimit rl;
|
||||
struct orlimit orl;
|
||||
int error;
|
||||
|
||||
SCARG(&ap, which) = linux_to_bsd_limit(SCARG(uap, which));
|
||||
SCARG(&ap, rlp) = stackgap_alloc(&sg, sizeof rl);
|
||||
if ((error = SCARG(&ap, which)) < 0)
|
||||
return -error;
|
||||
if ((error = copyin(SCARG(uap, rlp), &orl, sizeof(orl))) != 0)
|
||||
return error;
|
||||
linux_to_bsd_rlimit(&rl, &orl);
|
||||
if ((error = copyout(&rl, SCARG(uap, rlp), sizeof(rl))) != 0)
|
||||
return error;
|
||||
return sys_setrlimit(p, v, retval);
|
||||
}
|
||||
|
||||
int
|
||||
linux_sys_ugetrlimit(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
return linux_sys_getrlimit(p, v, retval);
|
||||
}
|
||||
|
||||
/*
|
||||
* This gets called for unsupported syscalls. The difference to sys_nosys()
|
||||
* is that process does not get SIGSYS, the call just returns with ENOSYS.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_misc.h,v 1.5 2001/07/18 19:11:14 thorpej Exp $ */
|
||||
/* $NetBSD: linux_misc.h,v 1.6 2002/02/15 16:48:03 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -65,6 +65,19 @@ struct linux_sysinfo {
|
|||
char _f[20-2*sizeof(long)-sizeof(int)];
|
||||
};
|
||||
|
||||
#define LINUX_RLIMIT_CPU 0
|
||||
#define LINUX_RLIMIT_FSIZE 1
|
||||
#define LINUX_RLIMIT_DATA 2
|
||||
#define LINUX_RLIMIT_STACK 3
|
||||
#define LINUX_RLIMIT_CORE 4
|
||||
#define LINUX_RLIMIT_RSS 5
|
||||
#define LINUX_RLIMIT_NPROC 6
|
||||
#define LINUX_RLIMIT_NOFILE 7
|
||||
#define LINUX_RLIMIT_MEMLOCK 8
|
||||
#define LINUX_RLIMIT_AS 9
|
||||
#define LINUX_RLIMIT_LOCKS 10
|
||||
#define LINUX_RLIM_INFINITY ~0ul
|
||||
|
||||
#ifdef _KERNEL
|
||||
__BEGIN_DECLS
|
||||
void bsd_to_linux_wstat __P((int *));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_mmap.h,v 1.11 2002/01/14 23:14:43 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_mmap.h,v 1.12 2002/02/15 16:48:03 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -90,6 +90,7 @@ struct linux_sys_mmap_args {
|
|||
#ifdef _KERNEL
|
||||
__BEGIN_DECLS
|
||||
int linux_sys_mmap __P((struct proc *p, void *v, register_t *retval));
|
||||
int linux_sys_mmap2 __P((struct proc *p, void *v, register_t *retval));
|
||||
__END_DECLS
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_oldmmap.c,v 1.54 2001/11/13 02:08:55 lukem Exp $ */
|
||||
/* $NetBSD: linux_oldmmap.c,v 1.55 2002/02/15 16:48:03 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.54 2001/11/13 02:08:55 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.55 2002/02/15 16:48:03 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -82,7 +82,9 @@ linux_sys_old_mmap(p, v, retval)
|
|||
SCARG(&nlmap,flags) = lmap.lm_flags;
|
||||
SCARG(&nlmap,fd) = lmap.lm_fd;
|
||||
SCARG(&nlmap,offset) = (unsigned)lmap.lm_pos;
|
||||
|
||||
uprintf("old_mmap(%p, %d, %d, %d, %d, %d)\n",
|
||||
lmap.lm_addr, lmap.lm_len, lmap.lm_prot, lmap.lm_flags,
|
||||
lmap.lm_fd, lmap.lm_pos);
|
||||
return linux_sys_mmap(p, &nlmap, retval);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_sig_notalpha.c,v 1.23 2001/11/13 02:08:58 lukem Exp $ */
|
||||
/* $NetBSD: linux_sig_notalpha.c,v 1.24 2002/02/15 16:48:03 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.23 2001/11/13 02:08:58 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.24 2002/02/15 16:48:03 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -112,7 +112,7 @@ linux_sys_siggetmask(p, v, retval)
|
|||
error = sigprocmask1(p, SIG_SETMASK, 0, &bss);
|
||||
if (error)
|
||||
return (error);
|
||||
native_to_linux_old_sigset(&bss, &lss);
|
||||
native_to_linux_old_sigset(&lss, &bss);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -136,11 +136,11 @@ linux_sys_sigsetmask(p, v, retval)
|
|||
int error;
|
||||
|
||||
nlss = SCARG(uap, mask);
|
||||
linux_old_to_native_sigset(&nlss, &nbss);
|
||||
linux_old_to_native_sigset(&nbss, &nlss);
|
||||
error = sigprocmask1(p, SIG_SETMASK, &nbss, &obss);
|
||||
if (error)
|
||||
return (error);
|
||||
native_to_linux_old_sigset(&obss, &olss);
|
||||
native_to_linux_old_sigset(&olss, &obss);
|
||||
*retval = olss;
|
||||
return (0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_sigaction.c,v 1.21 2001/11/13 02:08:58 lukem Exp $ */
|
||||
/* $NetBSD: linux_sigaction.c,v 1.22 2002/02/15 16:48:03 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.21 2001/11/13 02:08:58 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.22 2002/02/15 16:48:03 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -89,7 +89,7 @@ linux_sys_sigaction(p, v, retval)
|
|||
error = copyin(SCARG(uap, nsa), &nlsa, sizeof(nlsa));
|
||||
if (error)
|
||||
return (error);
|
||||
linux_old_to_native_sigaction(&nlsa, &nbsa);
|
||||
linux_old_to_native_sigaction(&nbsa, &nlsa);
|
||||
}
|
||||
sig = SCARG(uap, signum);
|
||||
if (sig < 0 || sig >= LINUX__NSIG)
|
||||
|
@ -106,7 +106,7 @@ linux_sys_sigaction(p, v, retval)
|
|||
return (error);
|
||||
}
|
||||
if (SCARG(uap, osa)) {
|
||||
native_to_linux_old_sigaction(&obsa, &olsa);
|
||||
native_to_linux_old_sigaction(&olsa, &obsa);
|
||||
error = copyout(&olsa, SCARG(uap, osa), sizeof(olsa));
|
||||
if (error)
|
||||
return (error);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_signal.c,v 1.32 2001/11/13 02:08:59 lukem Exp $ */
|
||||
/* $NetBSD: linux_signal.c,v 1.33 2002/02/15 16:48:03 christos Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
@ -54,7 +54,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.32 2001/11/13 02:08:59 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.33 2002/02/15 16:48:03 christos Exp $");
|
||||
|
||||
#define COMPAT_LINUX 1
|
||||
|
||||
|
@ -128,10 +128,10 @@ const int native_to_linux_sig[NSIG] = {
|
|||
*/
|
||||
#if LINUX__NSIG_WORDS > 1
|
||||
void
|
||||
linux_old_extra_to_native_sigset(lss, extra, bss)
|
||||
linux_old_extra_to_native_sigset(bss, lss, extra)
|
||||
sigset_t *bss;
|
||||
const linux_old_sigset_t *lss;
|
||||
const unsigned long *extra;
|
||||
sigset_t *bss;
|
||||
{
|
||||
linux_sigset_t lsnew;
|
||||
|
||||
|
@ -139,34 +139,34 @@ linux_old_extra_to_native_sigset(lss, extra, bss)
|
|||
linux_sigemptyset(&lsnew);
|
||||
lsnew.sig[0] = *lss;
|
||||
if (extra)
|
||||
bcopy(extra, &lsnew.sig[1],
|
||||
sizeof(linux_sigset_t) - sizeof(linux_old_sigset_t));
|
||||
memcpy(&lsnew.sig[1], extra,
|
||||
sizeof(linux_sigset_t) - sizeof(linux_old_sigset_t));
|
||||
|
||||
linux_to_native_sigset(&lsnew, bss);
|
||||
linux_to_native_sigset(bss, &lsnew);
|
||||
}
|
||||
|
||||
void
|
||||
native_to_linux_old_extra_sigset(bss, lss, extra)
|
||||
const sigset_t *bss;
|
||||
native_to_linux_old_extra_sigset(lss, extra, bss)
|
||||
linux_old_sigset_t *lss;
|
||||
unsigned long *extra;
|
||||
const sigset_t *bss;
|
||||
{
|
||||
linux_sigset_t lsnew;
|
||||
|
||||
native_to_linux_sigset(bss, &lsnew);
|
||||
native_to_linux_sigset(&lsnew, bss);
|
||||
|
||||
/* convert new sigset to old sigset */
|
||||
*lss = lsnew.sig[0];
|
||||
if (extra)
|
||||
bcopy(&lsnew.sig[1], extra,
|
||||
sizeof(linux_sigset_t) - sizeof(linux_old_sigset_t));
|
||||
memcpy(extra, &lsnew.sig[1],
|
||||
sizeof(linux_sigset_t) - sizeof(linux_old_sigset_t));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
linux_to_native_sigset(lss, bss)
|
||||
const linux_sigset_t *lss;
|
||||
linux_to_native_sigset(bss, lss)
|
||||
sigset_t *bss;
|
||||
const linux_sigset_t *lss;
|
||||
{
|
||||
int i, newsig;
|
||||
|
||||
|
@ -181,9 +181,9 @@ linux_to_native_sigset(lss, bss)
|
|||
}
|
||||
|
||||
void
|
||||
native_to_linux_sigset(bss, lss)
|
||||
const sigset_t *bss;
|
||||
native_to_linux_sigset(lss, bss)
|
||||
linux_sigset_t *lss;
|
||||
const sigset_t *bss;
|
||||
{
|
||||
int i, newsig;
|
||||
|
||||
|
@ -197,119 +197,109 @@ native_to_linux_sigset(bss, lss)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
native_to_linux_sigflags(lsf, bsf)
|
||||
unsigned long *lsf;
|
||||
const int *bsf;
|
||||
{
|
||||
*lsf = 0;
|
||||
if ((*bsf & SA_NOCLDSTOP) != 0)
|
||||
*lsf |= LINUX_SA_NOCLDSTOP;
|
||||
if ((*bsf & SA_NOCLDWAIT) != 0)
|
||||
*lsf |= LINUX_SA_NOCLDWAIT;
|
||||
if ((*bsf & SA_ONSTACK) != 0)
|
||||
*lsf |= LINUX_SA_ONSTACK;
|
||||
if ((*bsf & SA_RESTART) != 0)
|
||||
*lsf |= LINUX_SA_RESTART;
|
||||
if ((*bsf & SA_NODEFER) != 0)
|
||||
*lsf |= LINUX_SA_NOMASK;
|
||||
if ((*bsf & SA_RESETHAND) != 0)
|
||||
*lsf |= LINUX_SA_ONESHOT;
|
||||
if ((*bsf & SA_SIGINFO) != 0)
|
||||
*lsf |= LINUX_SA_SIGINFO;
|
||||
}
|
||||
|
||||
void
|
||||
linux_to_native_sigflags(bsf, lsf)
|
||||
int *bsf;
|
||||
const unsigned long *lsf;
|
||||
{
|
||||
*bsf = 0;
|
||||
if ((*lsf & LINUX_SA_NOCLDSTOP) != 0)
|
||||
*bsf |= SA_NOCLDSTOP;
|
||||
if ((*lsf & LINUX_SA_NOCLDWAIT) != 0)
|
||||
*bsf |= SA_NOCLDWAIT;
|
||||
if ((*lsf & LINUX_SA_ONSTACK) != 0)
|
||||
*bsf |= SA_ONSTACK;
|
||||
if ((*lsf & LINUX_SA_RESTART) != 0)
|
||||
*bsf |= SA_RESTART;
|
||||
if ((*lsf & LINUX_SA_ONESHOT) != 0)
|
||||
*bsf |= SA_RESETHAND;
|
||||
if ((*lsf & LINUX_SA_NOMASK) != 0)
|
||||
*bsf |= SA_NODEFER;
|
||||
if ((*lsf & LINUX_SA_SIGINFO) != 0)
|
||||
*bsf |= SA_SIGINFO;
|
||||
#ifdef DEBUG_LINUX
|
||||
if ((*lsf & ~LINUX_SA_ALLBITS) != 0)
|
||||
uprintf(
|
||||
"linux_old_to_native_sigflags: %lx extra bits ignored\n",
|
||||
*lsf);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert between Linux and BSD sigaction structures. Linux sometimes
|
||||
* has one extra field (sa_restorer) which we don't support.
|
||||
*/
|
||||
void
|
||||
linux_old_to_native_sigaction(lsa, bsa)
|
||||
struct linux_old_sigaction *lsa;
|
||||
linux_old_to_native_sigaction(bsa, lsa)
|
||||
struct sigaction *bsa;
|
||||
const struct linux_old_sigaction *lsa;
|
||||
{
|
||||
|
||||
bsa->sa_handler = lsa->sa_handler;
|
||||
linux_old_to_native_sigset(&lsa->sa_mask, &bsa->sa_mask);
|
||||
bsa->sa_flags = 0;
|
||||
if ((lsa->sa_flags & LINUX_SA_NOCLDSTOP) != 0)
|
||||
bsa->sa_flags |= SA_NOCLDSTOP;
|
||||
if ((lsa->sa_flags & LINUX_SA_ONSTACK) != 0)
|
||||
bsa->sa_flags |= SA_ONSTACK;
|
||||
if ((lsa->sa_flags & LINUX_SA_RESTART) != 0)
|
||||
bsa->sa_flags |= SA_RESTART;
|
||||
if ((lsa->sa_flags & LINUX_SA_ONESHOT) != 0)
|
||||
bsa->sa_flags |= SA_RESETHAND;
|
||||
if ((lsa->sa_flags & LINUX_SA_NOMASK) != 0)
|
||||
bsa->sa_flags |= SA_NODEFER;
|
||||
if ((lsa->sa_flags & LINUX_SA_SIGINFO) != 0)
|
||||
bsa->sa_flags |= SA_SIGINFO;
|
||||
linux_old_to_native_sigset(&bsa->sa_mask, &lsa->sa_mask);
|
||||
linux_to_native_sigflags(&bsa->sa_flags, &lsa->sa_mask);
|
||||
#ifdef DEBUG_LINUX
|
||||
if ((lsa->sa_flags & ~LINUX_SA_ALLBITS) != 0)
|
||||
/*XXX*/ printf("linux_old_to_native_sigaction: extra bits ignored\n");
|
||||
if (lsa->sa_restorer != 0)
|
||||
/*XXX*/ printf("linux_old_to_native_sigaction: sa_restorer ignored\n");
|
||||
if (lsa->sa_restorer != NULL)
|
||||
uprintf("linux_old_to_native_sigaction: sa_restorer ignored\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
native_to_linux_old_sigaction(bsa, lsa)
|
||||
struct sigaction *bsa;
|
||||
native_to_linux_old_sigaction(lsa, bsa)
|
||||
struct linux_old_sigaction *lsa;
|
||||
const struct sigaction *bsa;
|
||||
{
|
||||
|
||||
/* Clear sa_flags and sa_restorer (if it exists) */
|
||||
bzero(lsa, sizeof(struct linux_old_sigaction));
|
||||
|
||||
/* ...and fill in the mask and flags */
|
||||
native_to_linux_old_sigset(&bsa->sa_mask, &lsa->sa_mask);
|
||||
if ((bsa->sa_flags & SA_NOCLDSTOP) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_NOCLDSTOP;
|
||||
if ((bsa->sa_flags & SA_ONSTACK) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_ONSTACK;
|
||||
if ((bsa->sa_flags & SA_RESTART) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_RESTART;
|
||||
if ((bsa->sa_flags & SA_NODEFER) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_NOMASK;
|
||||
if ((bsa->sa_flags & SA_RESETHAND) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_ONESHOT;
|
||||
if ((bsa->sa_flags & SA_SIGINFO) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_SIGINFO;
|
||||
lsa->sa_handler = bsa->sa_handler;
|
||||
native_to_linux_old_sigset(&lsa->sa_mask, &bsa->sa_mask);
|
||||
native_to_linux_sigflags(&lsa->sa_flags, &bsa->sa_flags);
|
||||
lsa->sa_restorer = NULL;
|
||||
}
|
||||
|
||||
/* ...and the new sigaction conversion funcs. */
|
||||
void
|
||||
linux_to_native_sigaction(lsa, bsa)
|
||||
struct linux_sigaction *lsa;
|
||||
linux_to_native_sigaction(bsa, lsa)
|
||||
struct sigaction *bsa;
|
||||
const struct linux_sigaction *lsa;
|
||||
{
|
||||
|
||||
bsa->sa_handler = lsa->sa_handler;
|
||||
linux_to_native_sigset(&lsa->sa_mask, &bsa->sa_mask);
|
||||
bsa->sa_flags = 0;
|
||||
if ((lsa->sa_flags & LINUX_SA_NOCLDSTOP) != 0)
|
||||
bsa->sa_flags |= SA_NOCLDSTOP;
|
||||
if ((lsa->sa_flags & LINUX_SA_ONSTACK) != 0)
|
||||
bsa->sa_flags |= SA_ONSTACK;
|
||||
if ((lsa->sa_flags & LINUX_SA_RESTART) != 0)
|
||||
bsa->sa_flags |= SA_RESTART;
|
||||
if ((lsa->sa_flags & LINUX_SA_ONESHOT) != 0)
|
||||
bsa->sa_flags |= SA_RESETHAND;
|
||||
if ((lsa->sa_flags & LINUX_SA_NOMASK) != 0)
|
||||
bsa->sa_flags |= SA_NODEFER;
|
||||
if ((lsa->sa_flags & LINUX_SA_SIGINFO) != 0)
|
||||
bsa->sa_flags |= SA_SIGINFO;
|
||||
linux_to_native_sigset(&bsa->sa_mask, &lsa->sa_mask);
|
||||
linux_to_native_sigflags(&bsa->sa_flags, &lsa->sa_flags);
|
||||
#ifdef DEBUG_LINUX
|
||||
if ((lsa->sa_flags & ~LINUX_SA_ALLBITS) != 0)
|
||||
/*XXX*/ printf("linux_to_native_sigaction: extra bits ignored\n");
|
||||
if (lsa->sa_restorer != 0)
|
||||
/*XXX*/ printf("linux_to_native_sigaction: sa_restorer ignored\n");
|
||||
uprintf("linux_to_native_sigaction: sa_restorer ignored\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
native_to_linux_sigaction(bsa, lsa)
|
||||
struct sigaction *bsa;
|
||||
native_to_linux_sigaction(lsa, bsa)
|
||||
struct linux_sigaction *lsa;
|
||||
const struct sigaction *bsa;
|
||||
{
|
||||
|
||||
/* Clear sa_flags and sa_restorer (if it exists) */
|
||||
bzero(lsa, sizeof(struct linux_sigaction));
|
||||
|
||||
/* ...and fill in the mask and flags */
|
||||
native_to_linux_sigset(&bsa->sa_mask, &lsa->sa_mask);
|
||||
if ((bsa->sa_flags & SA_NOCLDSTOP) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_NOCLDSTOP;
|
||||
if ((bsa->sa_flags & SA_ONSTACK) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_ONSTACK;
|
||||
if ((bsa->sa_flags & SA_RESTART) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_RESTART;
|
||||
if ((bsa->sa_flags & SA_NODEFER) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_NOMASK;
|
||||
if ((bsa->sa_flags & SA_RESETHAND) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_ONESHOT;
|
||||
if ((bsa->sa_flags & SA_SIGINFO) != 0)
|
||||
lsa->sa_flags |= LINUX_SA_SIGINFO;
|
||||
lsa->sa_handler = bsa->sa_handler;
|
||||
native_to_linux_sigset(&lsa->sa_mask, &bsa->sa_mask);
|
||||
native_to_linux_sigflags(&lsa->sa_flags, &bsa->sa_flags);
|
||||
lsa->sa_restorer = NULL;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
@ -342,7 +332,7 @@ linux_sys_rt_sigaction(p, v, retval)
|
|||
error = copyin(SCARG(uap, nsa), &nlsa, sizeof(nlsa));
|
||||
if (error)
|
||||
return (error);
|
||||
linux_to_native_sigaction(&nlsa, &nbsa);
|
||||
linux_to_native_sigaction(&nbsa, &nlsa);
|
||||
}
|
||||
sig = SCARG(uap, signum);
|
||||
if (sig < 0 || sig >= LINUX__NSIG)
|
||||
|
@ -359,7 +349,7 @@ linux_sys_rt_sigaction(p, v, retval)
|
|||
return (error);
|
||||
}
|
||||
if (SCARG(uap, osa)) {
|
||||
native_to_linux_sigaction(&obsa, &olsa);
|
||||
native_to_linux_sigaction(&olsa, &obsa);
|
||||
error = copyout(&olsa, SCARG(uap, osa), sizeof(olsa));
|
||||
if (error)
|
||||
return (error);
|
||||
|
@ -396,14 +386,14 @@ linux_sigprocmask1(p, how, set, oset)
|
|||
error = copyin(set, &nlss, sizeof(nlss));
|
||||
if (error)
|
||||
return (error);
|
||||
linux_old_to_native_sigset(&nlss, &nbss);
|
||||
linux_old_to_native_sigset(&nbss, &nlss);
|
||||
}
|
||||
error = sigprocmask1(p, how,
|
||||
set ? &nbss : NULL, oset ? &obss : NULL);
|
||||
if (error)
|
||||
return (error);
|
||||
if (oset) {
|
||||
native_to_linux_old_sigset(&obss, &olss);
|
||||
native_to_linux_old_sigset(&olss, &obss);
|
||||
error = copyout(&olss, oset, sizeof(olss));
|
||||
if (error)
|
||||
return (error);
|
||||
|
@ -453,12 +443,12 @@ linux_sys_rt_sigprocmask(p, v, retval)
|
|||
error = copyin(set, &nlss, sizeof(nlss));
|
||||
if (error)
|
||||
return (error);
|
||||
linux_to_native_sigset(&nlss, &nbss);
|
||||
linux_to_native_sigset(&nbss, &nlss);
|
||||
}
|
||||
error = sigprocmask1(p, how,
|
||||
set ? &nbss : NULL, oset ? &obss : NULL);
|
||||
if (!error && oset) {
|
||||
native_to_linux_sigset(&obss, &olss);
|
||||
native_to_linux_sigset(&olss, &obss);
|
||||
error = copyout(&olss, oset, sizeof(olss));
|
||||
}
|
||||
return (error);
|
||||
|
@ -481,7 +471,7 @@ linux_sys_rt_sigpending(p, v, retval)
|
|||
return (EINVAL);
|
||||
|
||||
sigpending1(p, &bss);
|
||||
native_to_linux_sigset(&bss, &lss);
|
||||
native_to_linux_sigset(&lss, &bss);
|
||||
return copyout(&lss, SCARG(uap, set), sizeof(lss));
|
||||
}
|
||||
|
||||
|
@ -498,7 +488,7 @@ linux_sys_sigpending(p, v, retval)
|
|||
linux_old_sigset_t lss;
|
||||
|
||||
sigpending1(p, &bss);
|
||||
native_to_linux_old_sigset(&bss, &lss);
|
||||
native_to_linux_old_sigset(&lss, &bss);
|
||||
return copyout(&lss, SCARG(uap, set), sizeof(lss));
|
||||
}
|
||||
|
||||
|
@ -517,7 +507,7 @@ linux_sys_sigsuspend(p, v, retval)
|
|||
sigset_t bss;
|
||||
|
||||
lss = SCARG(uap, mask);
|
||||
linux_old_to_native_sigset(&lss, &bss);
|
||||
linux_old_to_native_sigset(&bss, &lss);
|
||||
return (sigsuspend1(p, &bss));
|
||||
}
|
||||
int
|
||||
|
@ -541,7 +531,7 @@ linux_sys_rt_sigsuspend(p, v, retval)
|
|||
if (error)
|
||||
return (error);
|
||||
|
||||
linux_to_native_sigset(&lss, &bss);
|
||||
linux_to_native_sigset(&bss, &lss);
|
||||
|
||||
return (sigsuspend1(p, &bss));
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_signal.h,v 1.15 2002/01/14 23:14:43 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_signal.h,v 1.16 2002/02/15 16:48:03 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -63,35 +63,37 @@ int linux_sigprocmask1 __P((struct proc *, int, const linux_old_sigset_t *,
|
|||
linux_old_sigset_t *));
|
||||
|
||||
#if LINUX__NSIG_WORDS > 1
|
||||
void linux_old_extra_to_native_sigset __P((const linux_old_sigset_t *,
|
||||
const unsigned long *, sigset_t *));
|
||||
void native_to_linux_old_extra_sigset __P((const sigset_t *,
|
||||
linux_old_sigset_t *, unsigned long *));
|
||||
void linux_old_extra_to_native_sigset __P((sigset_t *,
|
||||
const linux_old_sigset_t *, const unsigned long *));
|
||||
void native_to_linux_old_extra_sigset __P((linux_old_sigset_t *,
|
||||
unsigned long *, const sigset_t *));
|
||||
#define linux_old_to_native_sigset(x,y) \
|
||||
linux_old_extra_to_native_sigset(x, (const unsigned long *) 0, y)
|
||||
linux_old_extra_to_native_sigset(x, y, (const unsigned long *)0)
|
||||
#define native_to_linux_old_sigset(x,y) \
|
||||
native_to_linux_old_extra_sigset(x, y, (unsigned long *) 0)
|
||||
native_to_linux_old_extra_sigset(x, (unsigned long *)0, y)
|
||||
|
||||
#else /* LINUX__NSIG_WORDS == 1 */
|
||||
|
||||
#define linux_old_to_native_sigset(x,y) \
|
||||
linux_to_native_sigset((const linux_sigset_t *) x, y)
|
||||
linux_to_native_sigset(x, (const linux_sigset_t *)y)
|
||||
#define native_to_linux_old_sigset(x,y) \
|
||||
native_to_linux_sigset(x, (linux_sigset_t *) y)
|
||||
native_to_linux_sigset((linux_sigset_t *)x, y)
|
||||
#endif
|
||||
|
||||
void linux_to_native_sigset __P((const linux_sigset_t *, sigset_t *));
|
||||
void native_to_linux_sigset __P((const sigset_t *, linux_sigset_t *));
|
||||
void linux_to_native_sigset __P((sigset_t *, const linux_sigset_t *));
|
||||
void native_to_linux_sigset __P((linux_sigset_t *, const sigset_t *));
|
||||
void linux_to_native_sigflags __P((int *, const unsigned long *));
|
||||
void native_to_linux_sigflags __P((unsigned long *, const int *));
|
||||
|
||||
void linux_old_to_native_sigaction __P((struct linux_old_sigaction *,
|
||||
struct sigaction *));
|
||||
void native_to_linux_old_sigaction __P((struct sigaction *,
|
||||
struct linux_old_sigaction *));
|
||||
void linux_old_to_native_sigaction __P((struct sigaction *,
|
||||
const struct linux_old_sigaction *));
|
||||
void native_to_linux_old_sigaction __P((struct linux_old_sigaction *,
|
||||
const struct sigaction *));
|
||||
|
||||
void linux_to_native_sigaction __P((struct linux_sigaction *,
|
||||
struct sigaction *));
|
||||
void native_to_linux_sigaction __P((struct sigaction *,
|
||||
struct linux_sigaction *));
|
||||
void linux_to_native_sigaction __P((struct sigaction *,
|
||||
const struct linux_sigaction *));
|
||||
void native_to_linux_sigaction __P((struct linux_sigaction *,
|
||||
const struct sigaction *));
|
||||
|
||||
__END_DECLS
|
||||
#endif /* !_KERNEL */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_types.h,v 1.12 2002/01/14 23:14:44 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_types.h,v 1.13 2002/02/15 16:48:03 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -86,10 +86,10 @@ struct linux_utimbuf {
|
|||
|
||||
struct linux___sysctl {
|
||||
int *name;
|
||||
int namelen;
|
||||
void *old;
|
||||
int nlen;
|
||||
void *oldval;
|
||||
size_t *oldlenp;
|
||||
void *new;
|
||||
void *newval;
|
||||
size_t newlen;
|
||||
unsigned long __unused[4];
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: files.linux,v 1.14 2001/05/13 20:54:42 manu Exp $
|
||||
# $NetBSD: files.linux,v 1.15 2002/02/15 16:47:58 christos Exp $
|
||||
#
|
||||
# Config file description for machine-independent Linux compat code.
|
||||
# Included by ports that need it.
|
||||
|
@ -22,6 +22,7 @@ file compat/linux/common/linux_misc.c compat_linux
|
|||
file compat/linux/common/linux_sched.c compat_linux
|
||||
file compat/linux/common/linux_signal.c compat_linux
|
||||
file compat/linux/common/linux_socket.c compat_linux
|
||||
file compat/linux/common/linux_sysctl.c compat_linux
|
||||
file compat/linux/common/linux_termios.c compat_linux
|
||||
file compat/linux/common/linux_uselib.c compat_linux & exec_aout
|
||||
file compat/linux/common/linux_time.c compat_linux
|
||||
|
|
Loading…
Reference in New Issue