diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-14 17:20:15 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-14 17:20:15 +0000 |
commit | 64b4d28c38ccf69a468b90e8e45563ac947cd9b0 (patch) | |
tree | af8a0b5ad53aae44c343f989c0c8560dbfda1eee | |
parent | 71f75756c9aa40db0eb08d44adc57085fa0b6131 (diff) |
target-alpha: implement getxuid and getxgid syscalls
This patch implemented the setxuid and setxgid syscalls for Alpha.
These syscalls return two values, both uid/euid and gid/egid.
In addition to returning the first value in $v0, the additional
value is returned in the $a4 register.
The syscalls are used instead of the separate syscalls for those values
used on other architectures (this is probably because Alpha Linux started
out syscall compatible with DEC/OSF/Tru64).
With this patch, the perlbmk benchmarks from Spec2000 run properly.
(Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5722 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | linux-user/syscall.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ac7eb0d8de..4065917848 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5533,6 +5533,30 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, ret = get_errno(getuid()); break; #endif + +#if defined(TARGET_NR_getxuid) && defined(TARGET_ALPHA) + /* Alpha specific */ + case TARGET_NR_getxuid: + { + uid_t euid; + euid=geteuid(); + ((CPUAlphaState *)cpu_env)->ir[IR_A4]=euid; + } + ret = get_errno(getuid()); + break; +#endif +#if defined(TARGET_NR_getxgid) && defined(TARGET_ALPHA) + /* Alpha specific */ + case TARGET_NR_getxgid: + { + uid_t egid; + egid=getegid(); + ((CPUAlphaState *)cpu_env)->ir[IR_A4]=egid; + } + ret = get_errno(getgid()); + break; +#endif + #ifdef TARGET_NR_getgid32 case TARGET_NR_getgid32: ret = get_errno(getgid()); |