Patchwork linux-user: Add support for oldumount

login
register
mail settings
Submitter dillona@dillona.com
Date Jan. 4, 2013, 2:59 a.m.
Message ID <1357268368-3692-1-git-send-email-dillona@dillona.com>
Download mbox | patch
Permalink /patch/209353/
State New
Headers show

Comments

dillona@dillona.com - Jan. 4, 2013, 2:59 a.m.
From: Dillon Amburgey <dillona@dillona.com>

This is used at least on the Alpha architecture

Signed-off-by: Dillon Amburgey <dillona@dillona.com>
---
 linux-user/syscall.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
Richard Henderson - Jan. 4, 2013, 6:54 p.m.
On 01/03/2013 06:59 PM, dillona@dillona.com wrote:
> From: Dillon Amburgey <dillona@dillona.com>
> 
> This is used at least on the Alpha architecture
> 
> Signed-off-by: Dillon Amburgey <dillona@dillona.com>
> ---
>  linux-user/syscall.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index e99adab..0cd54f3 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -5497,6 +5497,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
>                          unlock_user(p3, arg3, 0);
>  			break;
>  		}
> +#ifdef TARGET_NR_oldumount
> +    case TARGET_NR_oldumount:
> +        if (!(p = lock_user_string(arg1)))
> +            goto efault;
> +        ret = get_errno(umount(p));
> +        unlock_user(p, arg1, 0);
> +        break;
> +#endif

It's probably better to rename the Alpha TARGET_NR_{oldumount,umount}
syscall names to TARGET_NR_{umount,umount2}.  Regardless of what the
names the kernel uses for these, it's the mapping to the implementations
in the syscall tables that matters.


r~

Patch

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index e99adab..0cd54f3 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5497,6 +5497,14 @@  abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
                         unlock_user(p3, arg3, 0);
 			break;
 		}
+#ifdef TARGET_NR_oldumount
+    case TARGET_NR_oldumount:
+        if (!(p = lock_user_string(arg1)))
+            goto efault;
+        ret = get_errno(umount(p));
+        unlock_user(p, arg1, 0);
+        break;
+#endif
 #ifdef TARGET_NR_umount
     case TARGET_NR_umount:
         if (!(p = lock_user_string(arg1)))