Deleted Added
full compact
28c28
< * $FreeBSD: head/sys/i386/linux/linux.h 78161 2001-06-13 10:58:39Z peter $
---
> * $FreeBSD: head/sys/i386/linux/linux.h 83221 2001-09-08 19:07:04Z marcel $
41c41
< extern u_char linux_debug_map[];
---
> extern u_char linux_debug_map[];
43,44c43,44
< #define ARGS(nm, fmt) "Linux-emul(%ld): "#nm"("fmt")\n", (long)p->p_pid
< #define LMSG(fmt) "Linux-emul(%ld): "fmt"\n", (long)p->p_pid
---
> #define ARGS(nm, fmt) "linux(%ld): "#nm"("fmt")\n", (long)p->p_pid
> #define LMSG(fmt) "linux(%ld): "fmt"\n", (long)p->p_pid
50a51,91
> * Provide a seperate set of types for the Linux types.
> */
> typedef int l_int;
> typedef int32_t l_long;
> typedef int64_t l_longlong;
> typedef short l_short;
> typedef unsigned int l_uint;
> typedef uint32_t l_ulong;
> typedef uint64_t l_ulonglong;
> typedef unsigned short l_ushort;
>
> typedef char *l_caddr_t;
> typedef l_long l_clock_t;
> typedef l_int l_daddr_t;
> typedef l_ushort l_dev_t;
> typedef l_uint l_gid_t;
> typedef l_ushort l_gid16_t;
> typedef l_ulong l_ino_t;
> typedef l_int l_key_t;
> typedef l_longlong l_loff_t;
> typedef l_ushort l_mode_t;
> typedef l_long l_off_t;
> typedef l_int l_pid_t;
> typedef l_uint l_size_t;
> typedef l_long l_suseconds_t;
> typedef l_long l_time_t;
> typedef l_uint l_uid_t;
> typedef l_ushort l_uid16_t;
>
> typedef struct {
> l_int val[2];
> } l_fsid_t;
>
> typedef struct {
> l_time_t tv_sec;
> l_suseconds_t tv_usec;
> } l_timeval;
>
> #define l_fd_set fd_set
>
> /*
55a97,109
> #define LINUX_CTL_MAXNAME 10
>
> struct l___sysctl_args
> {
> l_int *name;
> l_int nlen;
> void *oldval;
> l_size_t *oldlenp;
> void *newval;
> l_size_t newlen;
> l_ulong __spare[4];
> };
>
74a129,133
> struct l_rlimit {
> l_ulong rlim_cur;
> l_ulong rlim_max;
> };
>
82,94c141,147
< typedef char * linux_caddr_t;
< typedef long linux_clock_t;
< typedef u_short linux_dev_t;
< typedef u_short linux_gid_t;
< typedef u_long linux_ino_t;
< typedef int linux_key_t; /* XXX */
< typedef u_short linux_mode_t;
< typedef u_short linux_nlink_t;
< typedef long linux_off_t;
< typedef int linux_pid_t;
< typedef u_int linux_size_t;
< typedef long linux_time_t;
< typedef u_short linux_uid_t;
---
> /*
> * stat family of syscalls
> */
> struct l_timespec {
> l_ulong tv_sec;
> l_ulong tv_nsec;
> };
96,98c149,167
< typedef struct {
< long val[2];
< } linux_fsid_t;
---
> struct l_newstat {
> l_ushort st_dev;
> l_ushort __pad1;
> l_ulong st_ino;
> l_ushort st_mode;
> l_ushort st_nlink;
> l_ushort st_uid;
> l_ushort st_gid;
> l_ushort st_rdev;
> l_ushort __pad2;
> l_ulong st_size;
> l_ulong st_blksize;
> l_ulong st_blocks;
> struct l_timespec st_atimespec;
> struct l_timespec st_mtimespec;
> struct l_timespec st_ctimespec;
> l_ulong __unused4;
> l_ulong __unused5;
> };
100c169,189
< struct linux_new_utsname {
---
> struct l_stat64 {
> l_ushort st_dev;
> u_char __pad0[10];
> l_ulong __st_ino;
> l_uint st_mode;
> l_uint st_nlink;
> l_ulong st_uid;
> l_ulong st_gid;
> l_ushort st_rdev;
> u_char __pad3[10];
> l_longlong st_size;
> l_ulong st_blksize;
> l_ulong st_blocks;
> l_ulong __pad4;
> struct l_timespec st_atimespec;
> struct l_timespec st_mtimespec;
> struct l_timespec st_ctimespec;
> l_ulonglong st_ino;
> };
>
> struct l_new_utsname {
177d265
<
180a269,270
> typedef void (*l_handler_t)(l_int);
> typedef l_ulong l_osigset_t;
182,184d271
< typedef void (*linux_handler_t)(int);
< typedef u_long linux_osigset_t;
<
186,187c273,274
< u_int __bits[LINUX_NSIG_WORDS];
< } linux_sigset_t;
---
> l_uint __bits[LINUX_NSIG_WORDS];
> } l_sigset_t;
190,192c277,279
< linux_handler_t lsa_handler;
< linux_osigset_t lsa_mask;
< u_long lsa_flags;
---
> l_handler_t lsa_handler;
> l_osigset_t lsa_mask;
> l_ulong lsa_flags;
194c281
< } linux_osigaction_t;
---
> } l_osigaction_t;
197,198c284,285
< linux_handler_t lsa_handler;
< u_long lsa_flags;
---
> l_handler_t lsa_handler;
> l_ulong lsa_flags;
200,201c287,288
< linux_sigset_t lsa_mask;
< } linux_sigaction_t;
---
> l_sigset_t lsa_mask;
> } l_sigaction_t;
204,207c291,294
< void *ss_sp;
< int ss_flags;
< linux_size_t ss_size;
< } linux_stack_t;
---
> void *ss_sp;
> l_int ss_flags;
> l_size_t ss_size;
> } l_stack_t;
210,232c297,319
< struct linux_sigcontext {
< int sc_gs;
< int sc_fs;
< int sc_es;
< int sc_ds;
< int sc_edi;
< int sc_esi;
< int sc_ebp;
< int sc_esp;
< int sc_ebx;
< int sc_edx;
< int sc_ecx;
< int sc_eax;
< int sc_trapno;
< int sc_err;
< int sc_eip;
< int sc_cs;
< int sc_eflags;
< int sc_esp_at_signal;
< int sc_ss;
< int sc_387;
< int sc_mask;
< int sc_cr2;
---
> struct l_sigcontext {
> l_int sc_gs;
> l_int sc_fs;
> l_int sc_es;
> l_int sc_ds;
> l_int sc_edi;
> l_int sc_esi;
> l_int sc_ebp;
> l_int sc_esp;
> l_int sc_ebx;
> l_int sc_edx;
> l_int sc_ecx;
> l_int sc_eax;
> l_int sc_trapno;
> l_int sc_err;
> l_int sc_eip;
> l_int sc_cs;
> l_int sc_eflags;
> l_int sc_esp_at_signal;
> l_int sc_ss;
> l_int sc_387;
> l_int sc_mask;
> l_int sc_cr2;
235,240c322,327
< struct linux_ucontext {
< unsigned long uc_flags;
< void *uc_link;
< linux_stack_t uc_stack;
< struct linux_sigcontext uc_mcontext;
< linux_sigset_t uc_sigmask;
---
> struct l_ucontext {
> l_ulong uc_flags;
> void *uc_link;
> l_stack_t uc_stack;
> struct l_sigcontext uc_mcontext;
> l_sigset_t uc_sigmask;
243d329
<
245c331
< #define LINUX_SI_PAD_SIZE ((LINUX_SI_MAX_SIZE/sizeof(int)) - 3)
---
> #define LINUX_SI_PAD_SIZE ((LINUX_SI_MAX_SIZE/sizeof(l_int)) - 3)
247,251c333,336
< typedef struct siginfo {
< int lsi_signo;
< int lsi_errno;
< int lsi_code;
<
---
> typedef struct l_siginfo {
> l_int lsi_signo;
> l_int lsi_errno;
> l_int lsi_code;
253c338,339
< int _pad[LINUX_SI_PAD_SIZE];
---
> l_int _pad[LINUX_SI_PAD_SIZE];
>
255,256c341,342
< linux_pid_t _pid;
< linux_uid_t _uid;
---
> l_pid_t _pid;
> l_uid16_t _uid;
260,261c346,347
< unsigned int _timer1;
< unsigned int _timer2;
---
> l_uint _timer1;
> l_uint _timer2;
263c349
<
---
>
265,266c351,352
< linux_pid_t _pid; /* sender's pid */
< linux_uid_t _uid; /* sender's uid */
---
> l_pid_t _pid; /* sender's pid */
> l_uid16_t _uid; /* sender's uid */
271,275c357,361
< linux_pid_t _pid; /* which child */
< linux_uid_t _uid; /* sender's uid */
< int _status; /* exit code */
< linux_clock_t _utime;
< linux_clock_t _stime;
---
> l_pid_t _pid; /* which child */
> l_uid16_t _uid; /* sender's uid */
> l_int _status; /* exit code */
> l_clock_t _utime;
> l_clock_t _stime;
279c365
< void *_addr; /* faulting insn/memory ref. */
---
> void *_addr; /* faulting insn/memory ref. */
283,284c369,370
< int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
< int _fd;
---
> l_int _band; /* POLL_IN,POLL_OUT,POLL_MSG */
> l_int _fd;
287c373
< } linux_siginfo_t;
---
> } l_siginfo_t;
301c387
< struct linux_fpreg {
---
> struct l_fpreg {
306c392
< struct linux_fpxreg {
---
> struct l_fpxreg {
312c398
< struct linux_xmmreg {
---
> struct l_xmmreg {
316c402
< struct linux_fpstate {
---
> struct l_fpstate {
325c411
< struct linux_fpreg _st[8];
---
> struct l_fpreg _st[8];
333,334c419,420
< struct linux_fpxreg _fxsr_st[8]; /* reg data is ignored */
< struct linux_xmmreg _xmm[8];
---
> struct l_fpxreg _fxsr_st[8]; /* reg data is ignored */
> struct l_xmmreg _xmm[8];
344,349c430,435
< struct linux_sigframe {
< int sf_sig;
< struct linux_sigcontext sf_sc;
< struct linux_fpstate sf_fpstate;
< u_int sf_extramask[LINUX_NSIG_WORDS-1];
< linux_handler_t sf_handler;
---
> struct l_sigframe {
> l_int sf_sig;
> struct l_sigcontext sf_sc;
> struct l_fpstate sf_fpstate;
> l_uint sf_extramask[LINUX_NSIG_WORDS-1];
> l_handler_t sf_handler;
352,358c438,444
< struct linux_rt_sigframe {
< int sf_sig;
< linux_siginfo_t *sf_siginfo;
< struct linux_ucontext *sf_ucontext;
< linux_siginfo_t sf_si;
< struct linux_ucontext sf_sc;
< linux_handler_t sf_handler;
---
> struct l_rt_sigframe {
> l_int sf_sig;
> l_siginfo_t *sf_siginfo;
> struct l_ucontext *sf_ucontext;
> l_siginfo_t sf_si;
> struct l_ucontext sf_sc;
> l_handler_t sf_handler;
459a546,553
> union l_semun {
> l_int val;
> struct l_semid_ds *buf;
> l_ushort *array;
> struct l_seminfo *__buf;
> void *__pad;
> };
>
520,522c614,616
< struct linux_sockaddr {
< u_short sa_family;
< char sa_data[14];
---
> struct l_sockaddr {
> l_ushort sa_family;
> char sa_data[14];
525,531c619,625
< struct linux_ifmap {
< u_long mem_start;
< u_long mem_end;
< u_short base_addr;
< u_char irq;
< u_char dma;
< u_char port;
---
> struct l_ifmap {
> l_ulong mem_start;
> l_ulong mem_end;
> l_ushort base_addr;
> u_char irq;
> u_char dma;
> u_char port;
537c631
< struct linux_ifreq {
---
> struct l_ifreq {
543,553c637,647
< struct linux_sockaddr ifru_addr;
< struct linux_sockaddr ifru_dstaddr;
< struct linux_sockaddr ifru_broadaddr;
< struct linux_sockaddr ifru_netmask;
< struct linux_sockaddr ifru_hwaddr;
< short ifru_flags;
< int ifru_metric;
< int ifru_mtu;
< struct linux_ifmap ifru_map;
< char ifru_slave[LINUX_IFNAMSIZ]; /* Just fits the size */
< linux_caddr_t ifru_data;
---
> struct l_sockaddr ifru_addr;
> struct l_sockaddr ifru_dstaddr;
> struct l_sockaddr ifru_broadaddr;
> struct l_sockaddr ifru_netmask;
> struct l_sockaddr ifru_hwaddr;
> l_short ifru_flags;
> l_int ifru_metric;
> l_int ifru_mtu;
> struct l_ifmap ifru_map;
> char ifru_slave[LINUX_IFNAMSIZ];
> l_caddr_t ifru_data;
559a654,674
> /*
> * poll()
> */
> #define LINUX_POLLIN 0x0001
> #define LINUX_POLLPRI 0x0002
> #define LINUX_POLLOUT 0x0004
> #define LINUX_POLLERR 0x0008
> #define LINUX_POLLHUP 0x0010
> #define LINUX_POLLNVAL 0x0020
> #define LINUX_POLLRDNORM 0x0040
> #define LINUX_POLLRDBAND 0x0080
> #define LINUX_POLLWRNORM 0x0100
> #define LINUX_POLLWRBAND 0x0200
> #define LINUX_POLLMSG 0x0400
>
> struct l_pollfd {
> l_int fd;
> l_short events;
> l_short revents;
> };
>