Commit 7494b0f94f8409e588b0b130da41d06a88ea3b03

Authored by ths
1 parent eb5c851f

Linux userland emulation of syslog, from Debian patchset.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2420 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 6 additions and 2 deletions
linux-user/syscall.c
... ... @@ -140,6 +140,7 @@ type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
140 140 #define __NR_sys_getdents __NR_getdents
141 141 #define __NR_sys_getdents64 __NR_getdents64
142 142 #define __NR_sys_rt_sigqueueinfo __NR_rt_sigqueueinfo
  143 +#define __NR_sys_syslog __NR_syslog
143 144  
144 145 #if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__)
145 146 #define __NR__llseek __NR_lseek
... ... @@ -159,6 +160,7 @@ _syscall3(int, sys_getdents64, uint, fd, struct dirent64 *, dirp, uint, count);
159 160 _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
160 161 loff_t *, res, uint, wh);
161 162 _syscall3(int,sys_rt_sigqueueinfo,int,pid,int,sig,siginfo_t *,uinfo)
  163 +_syscall3(int,sys_syslog,int,type,char*,bufp,int,len)
162 164 #ifdef __NR_exit_group
163 165 _syscall1(int,exit_group,int,error_code)
164 166 #endif
... ... @@ -2947,9 +2949,11 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
2947 2949 ret = do_setsockopt(arg1, arg2, arg3, arg4, (socklen_t) arg5);
2948 2950 break;
2949 2951 #endif
2950   -
  2952 +
2951 2953 case TARGET_NR_syslog:
2952   - goto unimplemented;
  2954 + ret = get_errno(sys_syslog((int)arg1, (char*)arg2, (int)arg3));
  2955 + break;
  2956 +
2953 2957 case TARGET_NR_setitimer:
2954 2958 {
2955 2959 struct itimerval value, ovalue, *pvalue;
... ...