Commit e55744879fa56bdd257beb05de3163c917470731

Authored by ths
1 parent f2f1ac82

Fix previous Linux userland emulation breakage.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2423 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 17 additions and 2 deletions
linux-user/syscall.c
... ... @@ -2952,7 +2952,9 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
2952 2952 #endif
2953 2953  
2954 2954 case TARGET_NR_syslog:
2955   - ret = get_errno(sys_syslog((int)arg1, (char*)arg2, (int)arg3));
  2955 + p = lock_user_string(arg2);
  2956 + ret = get_errno(sys_syslog((int)arg1, p, (int)arg3));
  2957 + unlock_user(p, arg2, 0);
2956 2958 break;
2957 2959  
2958 2960 case TARGET_NR_setitimer:
... ... @@ -3423,7 +3425,20 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
3423 3425 case TARGET_NR_nfsservctl:
3424 3426 goto unimplemented;
3425 3427 case TARGET_NR_prctl:
3426   - ret = get_errno(prctl(arg1, arg2, arg3, arg4, arg5));
  3428 + switch (arg1)
  3429 + {
  3430 + case PR_GET_PDEATHSIG:
  3431 + {
  3432 + int deathsig;
  3433 + ret = get_errno(prctl(arg1, &deathsig, arg3, arg4, arg5));
  3434 + if (!is_error(ret) && arg2)
  3435 + tput32(arg2, deathsig);
  3436 + }
  3437 + break;
  3438 + default:
  3439 + ret = get_errno(prctl(arg1, arg2, arg3, arg4, arg5));
  3440 + break;
  3441 + }
3427 3442 break;
3428 3443 #ifdef TARGET_NR_pread
3429 3444 case TARGET_NR_pread:
... ...