diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-02-18 23:33:18 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-02-18 23:33:18 +0000 |
commit | 72f0390014bd416413ad5ae3435d3ab113776f6a (patch) | |
tree | a58e7f7a3566b439d0d303221f6a25d2f7d4a0e0 /linux-user | |
parent | b17780d52186c8bd94c722f6fc00d6d6b9fdcc5f (diff) |
suppressed clashes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@8 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/syscall.c | 35 | ||||
-rw-r--r-- | linux-user/syscall_defs.h | 2 |
2 files changed, 24 insertions, 13 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d5909b2215..f800fa219e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -37,7 +37,7 @@ #include <sched.h> #include <sys/socket.h> #include <sys/uio.h> -#include <sys/user.h> +//#include <sys/user.h> #define termios host_termios #define winsize host_winsize @@ -52,7 +52,7 @@ #include "gemu.h" -#define DEBUG +//#define DEBUG #ifndef PAGE_SIZE #define PAGE_SIZE 4096 @@ -73,18 +73,25 @@ struct dirent { #endif #define __NR_sys_uname __NR_uname -#define __NR_sys_getcwd __NR_getcwd +#define __NR_sys_getcwd1 __NR_getcwd #define __NR_sys_statfs __NR_statfs #define __NR_sys_fstatfs __NR_fstatfs +#define __NR_sys_getdents __NR_getdents +#ifdef __NR_gettid _syscall0(int, gettid) +#else +static int gettid(void) { + return -ENOSYS; +} +#endif _syscall1(int,sys_uname,struct new_utsname *,buf) -_syscall2(int,sys_getcwd,char *,buf,size_t,size) -_syscall3(int, getdents, uint, fd, struct dirent *, dirp, uint, count); +_syscall2(int,sys_getcwd1,char *,buf,size_t,size) +_syscall3(int, sys_getdents, uint, fd, struct dirent *, dirp, uint, count); _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, loff_t *, res, uint, wh); -_syscall2(int,sys_statfs,const char *,path,struct statfs *,buf) -_syscall2(int,sys_fstatfs,int,fd,struct statfs *,buf) +_syscall2(int,sys_statfs,const char *,path,struct kernel_statfs *,buf) +_syscall2(int,sys_fstatfs,int,fd,struct kernel_statfs *,buf) static inline long get_errno(long ret) { @@ -382,7 +389,9 @@ static long do_ioctl(long fd, long cmd, long arg) ie++; } arg_type = ie->arg_type; - // gemu_log("ioctl: cmd=0x%04lx (%s)\n", cmd, ie->name); +#ifdef DEBUG + gemu_log("ioctl: cmd=0x%04lx (%s)\n", cmd, ie->name); +#endif switch(arg_type[0]) { case TYPE_NULL: /* no argument */ @@ -612,9 +621,11 @@ long do_syscall(int num, long arg1, long arg2, long arg3, { long ret; struct stat st; - struct statfs *stfs; + struct kernel_statfs *stfs; - // gemu_log("syscall %d\n", num); +#ifdef DEBUG + gemu_log("syscall %d\n", num); +#endif switch(num) { case TARGET_NR_exit: _exit(arg1); @@ -1161,7 +1172,7 @@ long do_syscall(int num, long arg1, long arg2, long arg3, { struct dirent *dirp = (void *)arg2; long count = arg3; - ret = get_errno(getdents(arg1, dirp, count)); + ret = get_errno(sys_getdents(arg1, dirp, count)); if (!is_error(ret)) { struct dirent *de; int len = ret; @@ -1277,7 +1288,7 @@ long do_syscall(int num, long arg1, long arg2, long arg3, ret = get_errno(chown((const char *)arg1, arg2, arg3)); break; case TARGET_NR_getcwd: - ret = get_errno(sys_getcwd((char *)arg1, arg2)); + ret = get_errno(sys_getcwd1((char *)arg1, arg2)); break; case TARGET_NR_capget: case TARGET_NR_capset: diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index c8f25bb5b4..e8357dff36 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -52,7 +52,7 @@ typedef struct { int val[2]; } kernel_fsid_t; -struct statfs { +struct kernel_statfs { int f_type; int f_bsize; int f_blocks; |