qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5722] target-alpha: implement getxuid and getxgid syscalls
Date: Fri, 14 Nov 2008 17:20:18 +0000	[thread overview]
Message-ID: <E1L12LC-0001cT-44@cvs.savannah.gnu.org> (raw)

Revision: 5722
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5722
Author:   aurel32
Date:     2008-11-14 17:20:15 +0000 (Fri, 14 Nov 2008)

Log Message:
-----------
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)

Modified Paths:
--------------
    trunk/linux-user/syscall.c

Modified: trunk/linux-user/syscall.c
===================================================================
--- trunk/linux-user/syscall.c	2008-11-14 17:05:54 UTC (rev 5721)
+++ trunk/linux-user/syscall.c	2008-11-14 17:20:15 UTC (rev 5722)
@@ -5533,6 +5533,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());

                 reply	other threads:[~2008-11-14 17:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1L12LC-0001cT-44@cvs.savannah.gnu.org \
    --to=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).