mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-14 14:55:41 +00:00
Completed function declarations and added prototypes.
Removed some unnecessary #includes. Fixed warnings about nested externs.
This commit is contained in:
parent
55054f3540
commit
1f3dad5a8d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12458
@ -25,11 +25,11 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux.h,v 1.3 1995/06/08 13:50:52 sos Exp $
|
||||
* $Id: linux.h,v 1.1 1995/06/25 17:32:32 sos Exp $
|
||||
*/
|
||||
|
||||
#ifndef LINUX_H
|
||||
#define LINUX_H
|
||||
#ifndef _I386_LINUX_LINUX_H_
|
||||
#define _I386_LINUX_LINUX_H_
|
||||
|
||||
typedef unsigned short linux_uid_t;
|
||||
typedef unsigned short linux_gid_t;
|
||||
@ -403,4 +403,9 @@ extern int linux_to_bsd_signal[];
|
||||
#define LINUX_IP_TOS 1
|
||||
#define LINUX_IP_TTL 2
|
||||
|
||||
#endif /* LINUX_H */
|
||||
#ifdef KERNEL
|
||||
caddr_t ua_alloc_init __P((int len));
|
||||
caddr_t ua_alloc __P((int len));
|
||||
#endif
|
||||
|
||||
#endif /* !_I386_LINUX_LINUX_H_ */
|
||||
|
@ -25,15 +25,16 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_dummy.c,v 1.3 1995/06/08 13:50:52 sos Exp $
|
||||
* $Id: linux_dummy.c,v 1.1 1995/06/25 17:32:33 sos Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/resourcevar.h>
|
||||
#include <sys/errno.h>
|
||||
#include <vm/vm.h>
|
||||
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
int
|
||||
linux_setup(struct proc *p, void *args, int *retval)
|
||||
|
@ -25,12 +25,12 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_file.c,v 1.2 1995/08/28 00:50:08 swallace Exp $
|
||||
* $Id: linux_file.c,v 1.3 1995/10/10 23:13:27 swallace Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/filedesc.h>
|
||||
@ -41,9 +41,11 @@
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/dirent.h>
|
||||
#include <vm/vm.h>
|
||||
|
||||
#include <ufs/ufs/dir.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
struct linux_creat_args {
|
||||
char *path;
|
||||
@ -386,7 +388,8 @@ linux_readdir(struct proc *p, struct linux_readdir_args *args, int *retval)
|
||||
auio.uio_resid = buflen;
|
||||
auio.uio_offset = off - (off_t)blockoff;
|
||||
|
||||
error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, 0, 0);
|
||||
error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, (int *) NULL,
|
||||
(u_int **) NULL);
|
||||
if (error) {
|
||||
goto out;
|
||||
}
|
||||
|
@ -25,12 +25,12 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_ioctl.c,v 1.2 1995/06/07 21:27:57 sos Exp $
|
||||
* $Id: linux_ioctl.c,v 1.1 1995/06/25 17:32:35 sos Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ioctl_compat.h>
|
||||
@ -38,8 +38,11 @@
|
||||
#include <sys/filedesc.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/termios.h>
|
||||
|
||||
#include <machine/console.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
struct linux_termios {
|
||||
unsigned long c_iflag;
|
||||
@ -363,7 +366,7 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
|
||||
struct linux_winsize linux_winsize;
|
||||
struct filedesc *fdp = p->p_fd;
|
||||
struct file *fp;
|
||||
int (*func)();
|
||||
int (*func)(struct file *fp, int com, caddr_t data, struct proc *p);
|
||||
int bsd_line, linux_line;
|
||||
int error;
|
||||
|
||||
|
@ -25,19 +25,17 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_ipc.c,v 1.2 1995/06/07 21:27:57 sos Exp $
|
||||
* $Id: linux_ipc.c,v 1.1 1995/06/25 17:32:36 sos Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/sem.h>
|
||||
#include <sys/shm.h>
|
||||
#include <sys/msg.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
struct linux_ipc_perm {
|
||||
linux_key_t key;
|
||||
|
@ -25,12 +25,13 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_misc.c,v 1.2 1995/10/04 07:08:04 julian Exp $
|
||||
* $Id: linux_misc.c,v 1.3 1995/11/06 12:52:24 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/proc.h>
|
||||
@ -44,19 +45,19 @@
|
||||
#include <sys/resource.h>
|
||||
#include <sys/resourcevar.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/times.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/psl.h>
|
||||
#include <machine/reg.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_kern.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/psl.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
struct linux_alarm_args {
|
||||
unsigned int secs;
|
||||
@ -65,7 +66,6 @@ struct linux_alarm_args {
|
||||
int
|
||||
linux_alarm(struct proc *p, struct linux_alarm_args *args, int *retval)
|
||||
{
|
||||
extern struct timeval time;
|
||||
struct itimerval it, old_it;
|
||||
int s;
|
||||
|
||||
@ -111,7 +111,6 @@ linux_brk(struct proc *p, struct linux_brk_args *args, int *retval)
|
||||
struct vmspace *vm = p->p_vmspace;
|
||||
vm_offset_t new, old;
|
||||
int error;
|
||||
extern int swap_pager_full;
|
||||
|
||||
if ((vm_offset_t)args->dsend < (vm_offset_t)vm->vm_daddr)
|
||||
return EINVAL;
|
||||
@ -513,7 +512,6 @@ struct linux_tms_args {
|
||||
int
|
||||
linux_times(struct proc *p, struct linux_tms_args *args, int *retval)
|
||||
{
|
||||
extern int hz;
|
||||
struct timeval tv;
|
||||
struct linux_tms tms;
|
||||
|
||||
@ -549,8 +547,6 @@ int
|
||||
linux_newuname(struct proc *p, struct linux_newuname_args *args, int *retval)
|
||||
{
|
||||
struct linux_newuname_t linux_newuname;
|
||||
extern char ostype[], osrelease[], machine[];
|
||||
extern char hostname[], domainname[];
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Linux-emul(%d): newuname(*)\n", p->p_pid);
|
||||
|
@ -25,19 +25,19 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_signal.c,v 1.2 1995/06/07 21:27:57 sos Exp $
|
||||
* $Id: linux_signal.c,v 1.1 1995/06/25 17:32:40 sos Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/signalvar.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
#define DONTMASK (sigmask(SIGKILL)|sigmask(SIGSTOP)|sigmask(SIGCHLD))
|
||||
|
||||
|
@ -25,17 +25,23 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_socket.c,v 1.2 1995/06/07 21:27:57 sos Exp $
|
||||
* $Id: linux_socket.c,v 1.1 1995/06/25 17:32:41 sos Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
/* XXX we use functions that might not exist. */
|
||||
#define COMPAT_43 1
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socketvar.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
static int
|
||||
linux_to_bsd_domain(int domain)
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_stats.c,v 1.1 1995/06/25 17:32:42 sos Exp $
|
||||
* $Id: linux_stats.c,v 1.2 1995/08/28 09:18:38 julian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -36,14 +36,12 @@
|
||||
#include <sys/proc.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/psl.h>
|
||||
#include <machine/reg.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
struct linux_newstat {
|
||||
unsigned short stat_dev;
|
||||
|
@ -28,7 +28,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: imgact_linux.c,v 1.2 1995/08/24 10:32:27 davidg Exp $
|
||||
* $Id: imgact_linux.c,v 1.3 1995/11/06 12:52:23 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -44,6 +44,10 @@
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_kern.h>
|
||||
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
extern int exec_linux_imgact __P((struct image_params *iparams));
|
||||
|
||||
int
|
||||
exec_linux_imgact(imgp)
|
||||
struct image_params *imgp;
|
||||
@ -53,7 +57,6 @@ exec_linux_imgact(imgp)
|
||||
unsigned long vmaddr, virtual_offset, file_offset;
|
||||
unsigned long buffer, bss_size;
|
||||
int error;
|
||||
extern struct sysentvec linux_sysvec;
|
||||
|
||||
if (((a_out->a_magic >> 16) & 0xff) != 0x64)
|
||||
return -1;
|
||||
|
@ -25,11 +25,11 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux.h,v 1.3 1995/06/08 13:50:52 sos Exp $
|
||||
* $Id: linux.h,v 1.1 1995/06/25 17:32:32 sos Exp $
|
||||
*/
|
||||
|
||||
#ifndef LINUX_H
|
||||
#define LINUX_H
|
||||
#ifndef _I386_LINUX_LINUX_H_
|
||||
#define _I386_LINUX_LINUX_H_
|
||||
|
||||
typedef unsigned short linux_uid_t;
|
||||
typedef unsigned short linux_gid_t;
|
||||
@ -403,4 +403,9 @@ extern int linux_to_bsd_signal[];
|
||||
#define LINUX_IP_TOS 1
|
||||
#define LINUX_IP_TTL 2
|
||||
|
||||
#endif /* LINUX_H */
|
||||
#ifdef KERNEL
|
||||
caddr_t ua_alloc_init __P((int len));
|
||||
caddr_t ua_alloc __P((int len));
|
||||
#endif
|
||||
|
||||
#endif /* !_I386_LINUX_LINUX_H_ */
|
||||
|
@ -25,15 +25,16 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_dummy.c,v 1.3 1995/06/08 13:50:52 sos Exp $
|
||||
* $Id: linux_dummy.c,v 1.1 1995/06/25 17:32:33 sos Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/resourcevar.h>
|
||||
#include <sys/errno.h>
|
||||
#include <vm/vm.h>
|
||||
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
int
|
||||
linux_setup(struct proc *p, void *args, int *retval)
|
||||
|
@ -25,12 +25,12 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_file.c,v 1.2 1995/08/28 00:50:08 swallace Exp $
|
||||
* $Id: linux_file.c,v 1.3 1995/10/10 23:13:27 swallace Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/filedesc.h>
|
||||
@ -41,9 +41,11 @@
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/dirent.h>
|
||||
#include <vm/vm.h>
|
||||
|
||||
#include <ufs/ufs/dir.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
struct linux_creat_args {
|
||||
char *path;
|
||||
@ -386,7 +388,8 @@ linux_readdir(struct proc *p, struct linux_readdir_args *args, int *retval)
|
||||
auio.uio_resid = buflen;
|
||||
auio.uio_offset = off - (off_t)blockoff;
|
||||
|
||||
error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, 0, 0);
|
||||
error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, (int *) NULL,
|
||||
(u_int **) NULL);
|
||||
if (error) {
|
||||
goto out;
|
||||
}
|
||||
|
@ -25,21 +25,16 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_generic.c,v 1.3 1995/06/25 17:30:46 sos Exp $
|
||||
* $Id: linux_generic.c,v 1.1 1995/06/25 17:32:34 sos Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm.h> /* XXX for a macro in exec.h */
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
|
||||
static caddr_t ua_ptr = NULL;
|
||||
|
||||
|
@ -25,12 +25,12 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_ioctl.c,v 1.2 1995/06/07 21:27:57 sos Exp $
|
||||
* $Id: linux_ioctl.c,v 1.1 1995/06/25 17:32:35 sos Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ioctl_compat.h>
|
||||
@ -38,8 +38,11 @@
|
||||
#include <sys/filedesc.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/termios.h>
|
||||
|
||||
#include <machine/console.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
struct linux_termios {
|
||||
unsigned long c_iflag;
|
||||
@ -363,7 +366,7 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
|
||||
struct linux_winsize linux_winsize;
|
||||
struct filedesc *fdp = p->p_fd;
|
||||
struct file *fp;
|
||||
int (*func)();
|
||||
int (*func)(struct file *fp, int com, caddr_t data, struct proc *p);
|
||||
int bsd_line, linux_line;
|
||||
int error;
|
||||
|
||||
|
@ -25,19 +25,17 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_ipc.c,v 1.2 1995/06/07 21:27:57 sos Exp $
|
||||
* $Id: linux_ipc.c,v 1.1 1995/06/25 17:32:36 sos Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/sem.h>
|
||||
#include <sys/shm.h>
|
||||
#include <sys/msg.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
struct linux_ipc_perm {
|
||||
linux_key_t key;
|
||||
|
@ -25,12 +25,13 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_misc.c,v 1.2 1995/10/04 07:08:04 julian Exp $
|
||||
* $Id: linux_misc.c,v 1.3 1995/11/06 12:52:24 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/proc.h>
|
||||
@ -44,19 +45,19 @@
|
||||
#include <sys/resource.h>
|
||||
#include <sys/resourcevar.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/times.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/psl.h>
|
||||
#include <machine/reg.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_kern.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/psl.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
struct linux_alarm_args {
|
||||
unsigned int secs;
|
||||
@ -65,7 +66,6 @@ struct linux_alarm_args {
|
||||
int
|
||||
linux_alarm(struct proc *p, struct linux_alarm_args *args, int *retval)
|
||||
{
|
||||
extern struct timeval time;
|
||||
struct itimerval it, old_it;
|
||||
int s;
|
||||
|
||||
@ -111,7 +111,6 @@ linux_brk(struct proc *p, struct linux_brk_args *args, int *retval)
|
||||
struct vmspace *vm = p->p_vmspace;
|
||||
vm_offset_t new, old;
|
||||
int error;
|
||||
extern int swap_pager_full;
|
||||
|
||||
if ((vm_offset_t)args->dsend < (vm_offset_t)vm->vm_daddr)
|
||||
return EINVAL;
|
||||
@ -513,7 +512,6 @@ struct linux_tms_args {
|
||||
int
|
||||
linux_times(struct proc *p, struct linux_tms_args *args, int *retval)
|
||||
{
|
||||
extern int hz;
|
||||
struct timeval tv;
|
||||
struct linux_tms tms;
|
||||
|
||||
@ -549,8 +547,6 @@ int
|
||||
linux_newuname(struct proc *p, struct linux_newuname_args *args, int *retval)
|
||||
{
|
||||
struct linux_newuname_t linux_newuname;
|
||||
extern char ostype[], osrelease[], machine[];
|
||||
extern char hostname[], domainname[];
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Linux-emul(%d): newuname(*)\n", p->p_pid);
|
||||
|
@ -25,19 +25,19 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_signal.c,v 1.2 1995/06/07 21:27:57 sos Exp $
|
||||
* $Id: linux_signal.c,v 1.1 1995/06/25 17:32:40 sos Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/signalvar.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
#define DONTMASK (sigmask(SIGKILL)|sigmask(SIGSTOP)|sigmask(SIGCHLD))
|
||||
|
||||
|
@ -25,17 +25,23 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_socket.c,v 1.2 1995/06/07 21:27:57 sos Exp $
|
||||
* $Id: linux_socket.c,v 1.1 1995/06/25 17:32:41 sos Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
/* XXX we use functions that might not exist. */
|
||||
#define COMPAT_43 1
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socketvar.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
static int
|
||||
linux_to_bsd_domain(int domain)
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_stats.c,v 1.1 1995/06/25 17:32:42 sos Exp $
|
||||
* $Id: linux_stats.c,v 1.2 1995/08/28 09:18:38 julian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -36,14 +36,12 @@
|
||||
#include <sys/proc.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/psl.h>
|
||||
#include <machine/reg.h>
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
struct linux_newstat {
|
||||
unsigned short stat_dev;
|
||||
|
@ -25,290 +25,157 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_sysent.c,v 1.1 1995/06/25 17:32:43 sos Exp $
|
||||
* $Id: linux_sysent.c,v 1.2 1995/11/06 12:52:25 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <i386/linux/linux.h>
|
||||
/* XXX we use functions that might not exist. */
|
||||
#define COMPAT_43 1
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/imgact.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/signal.h>
|
||||
|
||||
extern int access();
|
||||
extern int acct();
|
||||
extern int linux_adjtimex();
|
||||
extern int linux_alarm();
|
||||
extern int linux_bdflush();
|
||||
extern int linux_break();
|
||||
extern int linux_brk();
|
||||
extern int chdir();
|
||||
extern int chmod();
|
||||
extern int chown();
|
||||
extern int chroot();
|
||||
extern int linux_clone();
|
||||
extern int close();
|
||||
extern int linux_creat();
|
||||
extern int linux_create_module();
|
||||
extern int linux_delete_module();
|
||||
extern int dup();
|
||||
extern int dup2();
|
||||
extern int execve();
|
||||
extern int exit();
|
||||
extern int fchdir();
|
||||
extern int fchmod();
|
||||
extern int fchown();
|
||||
extern int linux_fcntl();
|
||||
extern int linux_fork();
|
||||
extern int linux_fstat();
|
||||
extern int linux_fstatfs();
|
||||
extern int fsync();
|
||||
extern int linux_ftime();
|
||||
extern int oftruncate();
|
||||
extern int linux_get_kernel_syms();
|
||||
extern int getegid();
|
||||
extern int geteuid();
|
||||
extern int getgid();
|
||||
extern int getgroups();
|
||||
extern int getitimer();
|
||||
extern int linux_getpgid();
|
||||
extern int getpgrp();
|
||||
extern int getpid();
|
||||
extern int getppid();
|
||||
extern int getpriority();
|
||||
extern int ogetrlimit();
|
||||
extern int getrusage();
|
||||
extern int gettimeofday();
|
||||
extern int getuid();
|
||||
extern int linux_gtty();
|
||||
extern int linux_idle();
|
||||
extern int linux_init_module();
|
||||
extern int linux_ioctl();
|
||||
extern int linux_ioperm();
|
||||
extern int linux_iopl();
|
||||
extern int linux_ipc();
|
||||
extern int linux_kill();
|
||||
extern int link();
|
||||
extern int linux_lock();
|
||||
extern int linux_lseek();
|
||||
extern int ostat();
|
||||
extern int mkdir();
|
||||
extern int mknod();
|
||||
extern int linux_mmap();
|
||||
extern int linux_modify_ldt();
|
||||
extern int linux_mount();
|
||||
extern int mprotect();
|
||||
extern int linux_mpx();
|
||||
extern int munmap();
|
||||
extern int linux_newfstat();
|
||||
extern int linux_newlstat();
|
||||
extern int linux_newstat();
|
||||
extern int linux_newuname();
|
||||
extern int linux_nice();
|
||||
extern int linux_olduname();
|
||||
extern int linux_open();
|
||||
extern int linux_pause();
|
||||
extern int linux_phys();
|
||||
extern int linux_pipe();
|
||||
extern int linux_prof();
|
||||
extern int profil();
|
||||
extern int linux_ptrace();
|
||||
extern int linux_quotactl();
|
||||
extern int read();
|
||||
extern int linux_readdir();
|
||||
extern int readlink();
|
||||
extern int reboot();
|
||||
extern int rename();
|
||||
extern int rmdir();
|
||||
extern int linux_select();
|
||||
extern int setdomainname();
|
||||
extern int setgid();
|
||||
extern int setgroups();
|
||||
extern int osethostname();
|
||||
extern int setitimer();
|
||||
extern int setpgid();
|
||||
extern int setpriority();
|
||||
extern int setregid();
|
||||
extern int setreuid();
|
||||
extern int osetrlimit();
|
||||
extern int setsid();
|
||||
extern int settimeofday();
|
||||
extern int setuid();
|
||||
extern int sigreturn();
|
||||
extern int linux_setup();
|
||||
extern int linux_sigaction();
|
||||
extern int linux_siggetmask();
|
||||
extern int linux_signal();
|
||||
extern int linux_sigpending();
|
||||
extern int linux_sigprocmask();
|
||||
extern int linux_sigreturn();
|
||||
extern int linux_sigsetmask();
|
||||
extern int linux_sigsuspend();
|
||||
extern int linux_socketcall();
|
||||
extern int linux_stat();
|
||||
extern int linux_statfs();
|
||||
extern int linux_stime();
|
||||
extern int linux_stty();
|
||||
extern int linux_swapoff();
|
||||
extern int swapon();
|
||||
extern int symlink();
|
||||
extern int sync();
|
||||
extern int linux_sysinfo();
|
||||
extern int linux_syslog();
|
||||
extern int linux_time();
|
||||
extern int linux_times();
|
||||
extern int otruncate();
|
||||
extern int linux_ulimit();
|
||||
extern int umask();
|
||||
extern int linux_umount();
|
||||
extern int linux_uname();
|
||||
extern int unlink();
|
||||
extern int linux_uselib();
|
||||
extern int linux_ustat();
|
||||
extern int linux_utime();
|
||||
extern int linux_vhangup();
|
||||
extern int linux_vm86();
|
||||
extern int linux_wait4();
|
||||
extern int linux_waitpid();
|
||||
extern int write();
|
||||
#include <i386/linux/linux.h>
|
||||
#include <i386/linux/sysproto.h>
|
||||
|
||||
static struct sysent linux_sysent[] = {
|
||||
0, linux_setup, /* 0 */
|
||||
1, exit, /* 1 */
|
||||
0, linux_fork, /* 2 */
|
||||
3, read, /* 3 */
|
||||
3, write, /* 4 */
|
||||
3, linux_open, /* 5 */
|
||||
1, close, /* 6 */
|
||||
3, linux_waitpid, /* 7 */
|
||||
2, linux_creat, /* 8 */
|
||||
2, link, /* 9 */
|
||||
1, unlink, /* 10 */
|
||||
3, execve, /* 11 */
|
||||
1, chdir, /* 12 */
|
||||
1, linux_time, /* 13 */
|
||||
3, mknod, /* 14 */
|
||||
2, chmod, /* 15 */
|
||||
3, chown, /* 16 */
|
||||
1, linux_break, /* 17 */
|
||||
2, linux_stat, /* 18 */
|
||||
3, linux_lseek, /* 19 */
|
||||
0, getpid, /* 20 */
|
||||
5, linux_mount, /* 21 */
|
||||
1, linux_umount, /* 22 */
|
||||
1, setuid, /* 23 */
|
||||
0, getuid, /* 24 */
|
||||
1, linux_stime, /* 25 */
|
||||
4, linux_ptrace, /* 26 */
|
||||
1, linux_alarm, /* 27 */
|
||||
2, linux_fstat, /* 28 */
|
||||
0, linux_pause, /* 29 */
|
||||
2, linux_utime, /* 30 */
|
||||
0, linux_stty, /* 31 */
|
||||
0, linux_gtty, /* 32 */
|
||||
2, access, /* 33 */
|
||||
1, linux_nice, /* 34 */
|
||||
0, linux_ftime, /* 35 */
|
||||
0, sync, /* 36 */
|
||||
2, linux_kill, /* 37 */
|
||||
2, rename, /* 38 */
|
||||
2, mkdir, /* 39 */
|
||||
1, rmdir, /* 40 */
|
||||
1, dup, /* 41 */
|
||||
1, linux_pipe, /* 42 */
|
||||
1, linux_times, /* 43 */
|
||||
0, linux_prof, /* 44 */
|
||||
1, linux_brk, /* 45 */
|
||||
1, setgid, /* 46 */
|
||||
0, getgid, /* 47 */
|
||||
2, linux_signal, /* 48 */
|
||||
0, geteuid, /* 49 */
|
||||
0, getegid, /* 50 */
|
||||
0, acct, /* 51 */
|
||||
0, linux_phys, /* 52 */
|
||||
0, linux_lock, /* 53 */
|
||||
3, linux_ioctl, /* 54 */
|
||||
3, linux_fcntl, /* 55 */
|
||||
0, linux_mpx, /* 56 */
|
||||
2, setpgid, /* 57 */
|
||||
0, linux_ulimit, /* 58 */
|
||||
1, linux_olduname, /* 59 */
|
||||
1, umask, /* 60 */
|
||||
1, chroot, /* 61 */
|
||||
2, linux_ustat, /* 62 */
|
||||
2, dup2, /* 63 */
|
||||
0, getppid, /* 64 */
|
||||
0, getpgrp, /* 65 */
|
||||
0, setsid, /* 66 */
|
||||
3, linux_sigaction, /* 67 */
|
||||
0, linux_siggetmask, /* 68 */
|
||||
1, linux_sigsetmask, /* 69 */
|
||||
2, setreuid, /* 70 */
|
||||
2, setregid, /* 71 */
|
||||
1, linux_sigsuspend, /* 72 */
|
||||
1, linux_sigpending, /* 73 */
|
||||
2, osethostname, /* 74 */
|
||||
2, osetrlimit, /* 75 */
|
||||
2, ogetrlimit, /* 76 */
|
||||
2, getrusage, /* 77 */
|
||||
2, gettimeofday, /* 78 */
|
||||
2, settimeofday, /* 79 */
|
||||
2, getgroups, /* 80 */
|
||||
2, setgroups, /* 81 */
|
||||
1, linux_select, /* 82 */
|
||||
2, symlink, /* 83 */
|
||||
2, ostat, /* 84 */
|
||||
3, readlink, /* 85 */
|
||||
1, linux_uselib, /* 86 */
|
||||
1, swapon, /* 87 */
|
||||
3, reboot, /* 88 */
|
||||
3, linux_readdir, /* 89 */
|
||||
1, linux_mmap, /* 90 */
|
||||
2, munmap, /* 91 */
|
||||
2, otruncate, /* 92 */
|
||||
2, oftruncate, /* 93 */
|
||||
2, fchmod, /* 94 */
|
||||
3, fchown, /* 95 */
|
||||
2, getpriority, /* 96 */
|
||||
3, setpriority, /* 97 */
|
||||
0, profil, /* 98 */
|
||||
2, linux_statfs, /* 99 */
|
||||
2, linux_fstatfs, /* 100 */
|
||||
3, linux_ioperm, /* 101 */
|
||||
2, linux_socketcall, /* 102 */
|
||||
3, linux_syslog, /* 103 */
|
||||
3, setitimer, /* 104 */
|
||||
2, getitimer, /* 105 */
|
||||
2, linux_newstat, /* 106 */
|
||||
2, linux_newlstat, /* 107 */
|
||||
2, linux_newfstat, /* 108 */
|
||||
2, linux_uname, /* 109 */
|
||||
1, linux_iopl, /* 110 */
|
||||
0, linux_vhangup, /* 111 */
|
||||
0, linux_idle, /* 112 */
|
||||
1, linux_vm86, /* 113 */
|
||||
4, linux_wait4, /* 114 */
|
||||
1, linux_swapoff, /* 115 */
|
||||
1, linux_sysinfo, /* 116 */
|
||||
4, linux_ipc, /* 117 */
|
||||
1, fsync, /* 118 */
|
||||
1, linux_sigreturn, /* 119 */
|
||||
0, linux_clone, /* 120 */
|
||||
2, setdomainname, /* 121 */
|
||||
1, linux_newuname, /* 122 */
|
||||
3, linux_modify_ldt, /* 123 */
|
||||
1, linux_adjtimex, /* 124 */
|
||||
3, mprotect, /* 125 */
|
||||
3, linux_sigprocmask, /* 126 */
|
||||
2, linux_create_module, /* 127 */
|
||||
4, linux_init_module, /* 128 */
|
||||
1, linux_delete_module, /* 129 */
|
||||
1, linux_get_kernel_syms, /* 130 */
|
||||
0, linux_quotactl, /* 131 */
|
||||
1, linux_getpgid, /* 132 */
|
||||
1, fchdir, /* 133 */
|
||||
0, linux_bdflush, /* 134 */
|
||||
0, (sy_call_t *)linux_setup, /* 0 */
|
||||
1, (sy_call_t *)exit, /* 1 */
|
||||
0, (sy_call_t *)linux_fork, /* 2 */
|
||||
3, (sy_call_t *)read, /* 3 */
|
||||
3, (sy_call_t *)write, /* 4 */
|
||||
3, (sy_call_t *)linux_open, /* 5 */
|
||||
1, (sy_call_t *)close, /* 6 */
|
||||
3, (sy_call_t *)linux_waitpid, /* 7 */
|
||||
2, (sy_call_t *)linux_creat, /* 8 */
|
||||
2, (sy_call_t *)link, /* 9 */
|
||||
1, (sy_call_t *)unlink, /* 10 */
|
||||
3, (sy_call_t *)execve, /* 11 */
|
||||
1, (sy_call_t *)chdir, /* 12 */
|
||||
1, (sy_call_t *)linux_time, /* 13 */
|
||||
3, (sy_call_t *)mknod, /* 14 */
|
||||
2, (sy_call_t *)chmod, /* 15 */
|
||||
3, (sy_call_t *)chown, /* 16 */
|
||||
1, (sy_call_t *)linux_break, /* 17 */
|
||||
2, (sy_call_t *)linux_stat, /* 18 */
|
||||
3, (sy_call_t *)linux_lseek, /* 19 */
|
||||
0, (sy_call_t *)getpid, /* 20 */
|
||||
5, (sy_call_t *)linux_mount, /* 21 */
|
||||
1, (sy_call_t *)linux_umount, /* 22 */
|
||||
1, (sy_call_t *)setuid, /* 23 */
|
||||
0, (sy_call_t *)getuid, /* 24 */
|
||||
1, (sy_call_t *)linux_stime, /* 25 */
|
||||
4, (sy_call_t *)linux_ptrace, /* 26 */
|
||||
1, (sy_call_t *)linux_alarm, /* 27 */
|
||||
2, (sy_call_t *)linux_fstat, /* 28 */
|
||||
0, (sy_call_t *)linux_pause, /* 29 */
|
||||
2, (sy_call_t *)linux_utime, /* 30 */
|
||||
0, (sy_call_t *)linux_stty, /* 31 */
|
||||
0, (sy_call_t *)linux_gtty, /* 32 */
|
||||
2, (sy_call_t *)access, /* 33 */
|
||||
1, (sy_call_t *)linux_nice, /* 34 */
|
||||
0, (sy_call_t *)linux_ftime, /* 35 */
|
||||
0, (sy_call_t *)sync, /* 36 */
|
||||
2, (sy_call_t *)linux_kill, /* 37 */
|
||||
2, (sy_call_t *)rename, /* 38 */
|
||||
2, (sy_call_t *)mkdir, /* 39 */
|
||||
1, (sy_call_t *)rmdir, /* 40 */
|
||||
1, (sy_call_t *)dup, /* 41 */
|
||||
1, (sy_call_t *)linux_pipe, /* 42 */
|
||||
1, (sy_call_t *)linux_times, /* 43 */
|
||||
0, (sy_call_t *)linux_prof, /* 44 */
|
||||
1, (sy_call_t *)linux_brk, /* 45 */
|
||||
1, (sy_call_t *)setgid, /* 46 */
|
||||
0, (sy_call_t *)getgid, /* 47 */
|
||||
2, (sy_call_t *)linux_signal, /* 48 */
|
||||
0, (sy_call_t *)geteuid, /* 49 */
|
||||
0, (sy_call_t *)getegid, /* 50 */
|
||||
0, (sy_call_t *)acct, /* 51 */
|
||||
0, (sy_call_t *)linux_phys, /* 52 */
|
||||
0, (sy_call_t *)linux_lock, /* 53 */
|
||||
3, (sy_call_t *)linux_ioctl, /* 54 */
|
||||
3, (sy_call_t *)linux_fcntl, /* 55 */
|
||||
0, (sy_call_t *)linux_mpx, /* 56 */
|
||||
2, (sy_call_t *)setpgid, /* 57 */
|
||||
0, (sy_call_t *)linux_ulimit, /* 58 */
|
||||
1, (sy_call_t *)linux_olduname, /* 59 */
|
||||
1, (sy_call_t *)umask, /* 60 */
|
||||
1, (sy_call_t *)chroot, /* 61 */
|
||||
2, (sy_call_t *)linux_ustat, /* 62 */
|
||||
2, (sy_call_t *)dup2, /* 63 */
|
||||
0, (sy_call_t *)getppid, /* 64 */
|
||||
0, (sy_call_t *)getpgrp, /* 65 */
|
||||
0, (sy_call_t *)setsid, /* 66 */
|
||||
3, (sy_call_t *)linux_sigaction, /* 67 */
|
||||
0, (sy_call_t *)linux_siggetmask, /* 68 */
|
||||
1, (sy_call_t *)linux_sigsetmask, /* 69 */
|
||||
2, (sy_call_t *)setreuid, /* 70 */
|
||||
2, (sy_call_t *)setregid, /* 71 */
|
||||
1, (sy_call_t *)linux_sigsuspend, /* 72 */
|
||||
1, (sy_call_t *)linux_sigpending, /* 73 */
|
||||
2, (sy_call_t *)osethostname, /* 74 */
|
||||
2, (sy_call_t *)osetrlimit, /* 75 */
|
||||
2, (sy_call_t *)ogetrlimit, /* 76 */
|
||||
2, (sy_call_t *)getrusage, /* 77 */
|
||||
2, (sy_call_t *)gettimeofday, /* 78 */
|
||||
2, (sy_call_t *)settimeofday, /* 79 */
|
||||
2, (sy_call_t *)getgroups, /* 80 */
|
||||
2, (sy_call_t *)setgroups, /* 81 */
|
||||
1, (sy_call_t *)linux_select, /* 82 */
|
||||
2, (sy_call_t *)symlink, /* 83 */
|
||||
2, (sy_call_t *)ostat, /* 84 */
|
||||
3, (sy_call_t *)readlink, /* 85 */
|
||||
1, (sy_call_t *)linux_uselib, /* 86 */
|
||||
1, (sy_call_t *)swapon, /* 87 */
|
||||
3, (sy_call_t *)reboot, /* 88 */
|
||||
3, (sy_call_t *)linux_readdir, /* 89 */
|
||||
1, (sy_call_t *)linux_mmap, /* 90 */
|
||||
2, (sy_call_t *)munmap, /* 91 */
|
||||
2, (sy_call_t *)otruncate, /* 92 */
|
||||
2, (sy_call_t *)oftruncate, /* 93 */
|
||||
2, (sy_call_t *)fchmod, /* 94 */
|
||||
3, (sy_call_t *)fchown, /* 95 */
|
||||
2, (sy_call_t *)getpriority, /* 96 */
|
||||
3, (sy_call_t *)setpriority, /* 97 */
|
||||
0, (sy_call_t *)profil, /* 98 */
|
||||
2, (sy_call_t *)linux_statfs, /* 99 */
|
||||
2, (sy_call_t *)linux_fstatfs, /* 100 */
|
||||
3, (sy_call_t *)linux_ioperm, /* 101 */
|
||||
2, (sy_call_t *)linux_socketcall, /* 102 */
|
||||
3, (sy_call_t *)linux_syslog, /* 103 */
|
||||
3, (sy_call_t *)setitimer, /* 104 */
|
||||
2, (sy_call_t *)getitimer, /* 105 */
|
||||
2, (sy_call_t *)linux_newstat, /* 106 */
|
||||
2, (sy_call_t *)linux_newlstat, /* 107 */
|
||||
2, (sy_call_t *)linux_newfstat, /* 108 */
|
||||
2, (sy_call_t *)linux_uname, /* 109 */
|
||||
1, (sy_call_t *)linux_iopl, /* 110 */
|
||||
0, (sy_call_t *)linux_vhangup, /* 111 */
|
||||
0, (sy_call_t *)linux_idle, /* 112 */
|
||||
1, (sy_call_t *)linux_vm86, /* 113 */
|
||||
4, (sy_call_t *)linux_wait4, /* 114 */
|
||||
1, (sy_call_t *)linux_swapoff, /* 115 */
|
||||
1, (sy_call_t *)linux_sysinfo, /* 116 */
|
||||
4, (sy_call_t *)linux_ipc, /* 117 */
|
||||
1, (sy_call_t *)fsync, /* 118 */
|
||||
1, (sy_call_t *)linux_sigreturn, /* 119 */
|
||||
0, (sy_call_t *)linux_clone, /* 120 */
|
||||
2, (sy_call_t *)setdomainname, /* 121 */
|
||||
1, (sy_call_t *)linux_newuname, /* 122 */
|
||||
3, (sy_call_t *)linux_modify_ldt, /* 123 */
|
||||
1, (sy_call_t *)linux_adjtimex, /* 124 */
|
||||
3, (sy_call_t *)mprotect, /* 125 */
|
||||
3, (sy_call_t *)linux_sigprocmask, /* 126 */
|
||||
2, (sy_call_t *)linux_create_module, /* 127 */
|
||||
4, (sy_call_t *)linux_init_module, /* 128 */
|
||||
1, (sy_call_t *)linux_delete_module, /* 129 */
|
||||
1, (sy_call_t *)linux_get_kernel_syms, /* 130 */
|
||||
0, (sy_call_t *)linux_quotactl, /* 131 */
|
||||
1, (sy_call_t *)linux_getpgid, /* 132 */
|
||||
1, (sy_call_t *)fchdir, /* 133 */
|
||||
0, (sy_call_t *)linux_bdflush, /* 134 */
|
||||
};
|
||||
|
||||
int bsd_to_linux_errno[ELAST] = {
|
||||
@ -353,6 +220,7 @@ int linux_fixup(int **stack_base, struct image_params *imgp)
|
||||
**stack_base = (int)argv;
|
||||
(*stack_base)--;
|
||||
**stack_base = (int)imgp->argc;
|
||||
return 0; /* XXX */
|
||||
}
|
||||
|
||||
struct sysentvec linux_sysvec = {
|
||||
|
207
sys/i386/linux/sysproto.h
Normal file
207
sys/i386/linux/sysproto.h
Normal file
@ -0,0 +1,207 @@
|
||||
/*-
|
||||
* Prototypes for linux system call functions.
|
||||
* Bruce Evans, November 1995.
|
||||
* This file is in the public domain.
|
||||
*/
|
||||
|
||||
#ifndef _I386_LINUX_SYSPROTO_H_
|
||||
#define _I386_LINUX_SYSPROTO_H_
|
||||
|
||||
struct linux_accept_args;
|
||||
struct linux_alarm_args;
|
||||
struct linux_bind_args;
|
||||
struct linux_brk_args;
|
||||
struct linux_connect_args;
|
||||
struct linux_creat_args;
|
||||
struct linux_fcntl_args;
|
||||
struct linux_fstatfs_args;
|
||||
struct linux_getpeername_args;
|
||||
struct linux_getpgid_args;
|
||||
struct linux_getsockname_args;
|
||||
struct linux_getsockopt_args;
|
||||
struct linux_ioctl_args;
|
||||
struct linux_ipc_args;
|
||||
struct linux_kill_args;
|
||||
struct linux_listen_args;
|
||||
struct linux_lseek_args;
|
||||
struct linux_mmap_args;
|
||||
struct linux_newfstat_args;
|
||||
struct linux_newstat_args;
|
||||
struct linux_newuname_args;
|
||||
struct linux_open_args;
|
||||
struct linux_pipe_args;
|
||||
struct linux_readdir_args;
|
||||
struct linux_recv_args;
|
||||
struct linux_recvfrom_args;
|
||||
struct linux_select_args;
|
||||
struct linux_send_args;
|
||||
struct linux_sendto_args;
|
||||
struct linux_setsockopt_args;
|
||||
struct linux_shutdown_args;
|
||||
struct linux_sigaction_args;
|
||||
struct linux_sigpending_args;
|
||||
struct linux_sigprocmask_args;
|
||||
struct linux_sigsetmask_args;
|
||||
struct linux_sigsuspend_args;
|
||||
struct linux_socket_args;
|
||||
struct linux_socketcall_args;
|
||||
struct linux_socketpair_args;
|
||||
struct linux_statfs_args;
|
||||
struct linux_time_args;
|
||||
struct linux_tms_args;
|
||||
struct linux_uselib_args;
|
||||
struct linux_utime_args;
|
||||
struct linux_wait4_args;
|
||||
struct linux_waitpid_args;
|
||||
|
||||
/* linux_dummy.c */
|
||||
int linux_adjtimex __P((struct proc *p, void *args, int *retval));
|
||||
int linux_bdflush __P((struct proc *p, void *args, int *retval));
|
||||
int linux_break __P((struct proc *p, void *args, int *retval));
|
||||
int linux_clone __P((struct proc *p, void *args, int *retval));
|
||||
int linux_create_module __P((struct proc *p, void *args, int *retval));
|
||||
int linux_delete_module __P((struct proc *p, void *args, int *retval));
|
||||
int linux_fstat __P((struct proc *p, void *args, int *retval));
|
||||
int linux_ftime __P((struct proc *p, void *args, int *retval));
|
||||
int linux_get_kernel_syms __P((struct proc *p, void *args, int *retval));
|
||||
int linux_gtty __P((struct proc *p, void *args, int *retval));
|
||||
int linux_idle __P((struct proc *p, void *args, int *retval));
|
||||
int linux_init_module __P((struct proc *p, void *args, int *retval));
|
||||
int linux_ioperm __P((struct proc *p, void *args, int *retval));
|
||||
int linux_iopl __P((struct proc *p, void *args, int *retval));
|
||||
int linux_lock __P((struct proc *p, void *args, int *retval));
|
||||
int linux_modify_ldt __P((struct proc *p, void *args, int *retval));
|
||||
int linux_mount __P((struct proc *p, void *args, int *retval));
|
||||
int linux_mpx __P((struct proc *p, void *args, int *retval));
|
||||
int linux_nice __P((struct proc *p, void *args, int *retval));
|
||||
int linux_olduname __P((struct proc *p, void *args, int *retval));
|
||||
int linux_pause __P((struct proc *p, void *args, int *retval));
|
||||
int linux_phys __P((struct proc *p, void *args, int *retval));
|
||||
int linux_prof __P((struct proc *p, void *args, int *retval));
|
||||
int linux_ptrace __P((struct proc *p, void *args, int *retval));
|
||||
int linux_quotactl __P((struct proc *p, void *args, int *retval));
|
||||
int linux_setup __P((struct proc *p, void *args, int *retval));
|
||||
int linux_signal __P((struct proc *p, void *args, int *retval));
|
||||
int linux_sigreturn __P((struct proc *p, void *args, int *retval));
|
||||
int linux_stat __P((struct proc *p, void *args, int *retval));
|
||||
int linux_stime __P((struct proc *p, void *args, int *retval));
|
||||
int linux_stty __P((struct proc *p, void *args, int *retval));
|
||||
int linux_swapoff __P((struct proc *p, void *args, int *retval));
|
||||
int linux_sysinfo __P((struct proc *p, void *args, int *retval));
|
||||
int linux_syslog __P((struct proc *p, void *args, int *retval));
|
||||
int linux_ulimit __P((struct proc *p, void *args, int *retval));
|
||||
int linux_umount __P((struct proc *p, void *args, int *retval));
|
||||
int linux_uname __P((struct proc *p, void *args, int *retval));
|
||||
int linux_ustat __P((struct proc *p, void *args, int *retval));
|
||||
int linux_vhangup __P((struct proc *p, void *args, int *retval));
|
||||
int linux_vm86 __P((struct proc *p, void *args, int *retval));
|
||||
|
||||
/* linux_file.c */
|
||||
int linux_creat __P((struct proc *p, struct linux_creat_args *args,
|
||||
int *retval));
|
||||
int linux_fcntl __P((struct proc *p, struct linux_fcntl_args *args,
|
||||
int *retval));
|
||||
int linux_lseek __P((struct proc *p, struct linux_lseek_args *args,
|
||||
int *retval));
|
||||
int linux_open __P((struct proc *p, struct linux_open_args *args,
|
||||
int *retval));
|
||||
int linux_readdir __P((struct proc *p, struct linux_readdir_args *args,
|
||||
int *retval));
|
||||
|
||||
/* linux_ioctl.c */
|
||||
int linux_ioctl __P((struct proc *p, struct linux_ioctl_args *args,
|
||||
int *retval));
|
||||
|
||||
/* linux_ipc.c */
|
||||
int linux_ipc __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
int linux_msgctl __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
int linux_msgget __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
int linux_msgrcv __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
int linux_msgsnd __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
int linux_semctl __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
int linux_semget __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
int linux_semop __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
int linux_shmat __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
int linux_shmctl __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
int linux_shmdt __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
int linux_shmget __P((struct proc *p, struct linux_ipc_args *args,
|
||||
int *retval));
|
||||
|
||||
/* linux_misc.c */
|
||||
int linux_alarm __P((struct proc *p, struct linux_alarm_args *args,
|
||||
int *retval));
|
||||
int linux_brk __P((struct proc *p, struct linux_brk_args *args,
|
||||
int *retval));
|
||||
int linux_fork __P((struct proc *p, void *args, int *retval));
|
||||
int linux_getpgid __P((struct proc *p, struct linux_getpgid_args *args,
|
||||
int *retval));
|
||||
int linux_mmap __P((struct proc *p, struct linux_mmap_args *args,
|
||||
int *retval));
|
||||
int linux_newuname __P((struct proc *p, struct linux_newuname_args *args,
|
||||
int *retval));
|
||||
int linux_pipe __P((struct proc *p, struct linux_pipe_args *args,
|
||||
int *retval));
|
||||
int linux_select __P((struct proc *p, struct linux_select_args *args,
|
||||
int *retval));
|
||||
int linux_time __P((struct proc *p, struct linux_time_args *args,
|
||||
int *retval));
|
||||
int linux_times __P((struct proc *p, struct linux_tms_args *args,
|
||||
int *retval));
|
||||
int linux_uselib __P((struct proc *p, struct linux_uselib_args *args,
|
||||
int *retval));
|
||||
int linux_utime __P((struct proc *p, struct linux_utime_args *args,
|
||||
int *retval));
|
||||
int linux_wait4 __P((struct proc *p, struct linux_wait4_args *args,
|
||||
int *retval));
|
||||
int linux_waitpid __P((struct proc *p, struct linux_waitpid_args *args,
|
||||
int *retval));
|
||||
|
||||
/* linux_signal.c */
|
||||
int linux_kill __P((struct proc *p, struct linux_kill_args *args,
|
||||
int *retval));
|
||||
int linux_sigaction __P((struct proc *p, struct linux_sigaction_args *args,
|
||||
int *retval));
|
||||
int linux_siggetmask __P((struct proc *p, void *args, int *retval));
|
||||
int linux_sigpending __P((struct proc *p,
|
||||
struct linux_sigpending_args *args, int *retval));
|
||||
int linux_sigprocmask __P((struct proc *p,
|
||||
struct linux_sigprocmask_args *args,
|
||||
int *retval));
|
||||
int linux_sigsetmask __P((struct proc *p,
|
||||
struct linux_sigsetmask_args *args, int *retval));
|
||||
int linux_sigsuspend __P((struct proc *p,
|
||||
struct linux_sigsuspend_args *args, int *retval));
|
||||
|
||||
/* linux_socket.c */
|
||||
int linux_socketcall __P((struct proc *p,
|
||||
struct linux_socketcall_args *args, int *retval));
|
||||
|
||||
/* linux_stats.c */
|
||||
int linux_fstatfs __P((struct proc *p, struct linux_fstatfs_args *args,
|
||||
int *retval));
|
||||
int linux_newfstat __P((struct proc *p, struct linux_newfstat_args *args,
|
||||
int *retval));
|
||||
int linux_newlstat __P((struct proc *p, struct linux_newstat_args *args,
|
||||
int *retval));
|
||||
int linux_newstat __P((struct proc *p, struct linux_newstat_args *args,
|
||||
int *retval));
|
||||
int linux_statfs __P((struct proc *p, struct linux_statfs_args *args,
|
||||
int *retval));
|
||||
|
||||
struct image_params;
|
||||
int linux_fixup __P((int **stack_base, struct image_params *iparams));
|
||||
|
||||
extern struct sysentvec linux_sysvec;
|
||||
|
||||
#endif /* !_I386_LINUX_SYSPROTO_H_ */
|
Loading…
Reference in New Issue
Block a user