qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 028/108] linux-user: Split out getpgrp, getppid,


From: Richard Henderson
Subject: [Qemu-devel] [PATCH v2 028/108] linux-user: Split out getpgrp, getppid, setsid
Date: Sat, 9 Jun 2018 17:01:00 -1000

Signed-off-by: Richard Henderson <address@hidden>
---
 linux-user/syscall.c | 36 ++++++++++++++++++++++++++----------
 1 file changed, 26 insertions(+), 10 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 8e13a16e91..d78288258a 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8131,6 +8131,13 @@ IMPL(futimesat)
 }
 #endif
 
+#ifdef TARGET_NR_getpgrp
+IMPL(getpgrp)
+{
+    return get_errno(getpgrp());
+}
+#endif
+
 #ifdef TARGET_NR_getpid
 IMPL(getpid)
 {
@@ -8138,6 +8145,13 @@ IMPL(getpid)
 }
 #endif
 
+#ifdef TARGET_NR_getppid
+IMPL(getppid)
+{
+    return get_errno(getppid());
+}
+#endif
+
 #if defined(TARGET_NR_getxpid) && defined(TARGET_ALPHA)
 IMPL(getxpid)
 {
@@ -8613,6 +8627,11 @@ IMPL(setpgid)
     return get_errno(setpgid(arg1, arg2));
 }
 
+IMPL(setsid)
+{
+    return get_errno(setsid());
+}
+
 #ifdef TARGET_NR_stime
 IMPL(stime)
 {
@@ -8854,16 +8873,6 @@ static abi_long do_syscall1(void *cpu_env, unsigned num, 
abi_long arg1,
     void *p;
 
     switch(num) {
-#ifdef TARGET_NR_getppid /* not on alpha */
-    case TARGET_NR_getppid:
-        return get_errno(getppid());
-#endif
-#ifdef TARGET_NR_getpgrp
-    case TARGET_NR_getpgrp:
-        return get_errno(getpgrp());
-#endif
-    case TARGET_NR_setsid:
-        return get_errno(setsid());
 #ifdef TARGET_NR_sigaction
     case TARGET_NR_sigaction:
         {
@@ -12673,9 +12682,15 @@ static impl_fn *syscall_table(unsigned num)
 #ifdef TARGET_NR_futimesat
         SYSCALL(futimesat);
 #endif
+#ifdef TARGET_NR_getpgrp
+        SYSCALL(getpgrp);
+#endif
 #ifdef TARGET_NR_getpid
         SYSCALL(getpid);
 #endif
+#ifdef TARGET_NR_getppid
+        SYSCALL(getppid);
+#endif
 #if defined(TARGET_NR_getxpid) && defined(TARGET_ALPHA)
         SYSCALL(getxpid);
 #endif
@@ -12727,6 +12742,7 @@ static impl_fn *syscall_table(unsigned num)
         SYSCALL(rmdir);
 #endif
         SYSCALL(setpgid);
+        SYSCALL(setsid);
 #ifdef TARGET_NR_stime
         SYSCALL(stime);
 #endif
-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]