qemu-devel@nongnu.org
[Top] [All Lists]

[Qemu-devel] [patch] implement alpha getxuid and getxgid syscalls

Subject: [Qemu-devel] [patch] implement alpha getxuid and getxgid syscalls
From: Vince Weaver
Date: Wed, 12 Nov 2008 16:39:14 -0500 EST
Hello

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

Index: linux-user/syscall.c
===================================================================
--- linux-user/syscall.c        (revision 5663)
+++ linux-user/syscall.c        (working copy)
@@ -5529,6 +5529,30 @@
         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());



<Prev in Thread] Current Thread [Next in Thread>