* [PATCH] linux-user, alpha: fix oldumount syscall
@ 2020-05-02 19:46 Laurent Vivier
2020-05-27 14:28 ` Laurent Vivier
0 siblings, 1 reply; 2+ messages in thread
From: Laurent Vivier @ 2020-05-02 19:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Riku Voipio, Laurent Vivier
When we try to bootstrap debian/lenny for alpha, it fails because
it cannot umount /.root directory:
...
Setting up initscripts (2.86.ds1-61) ...
umount: /.root: Function not implemented
dpkg: error processing initscripts (--configure):
subprocess post-installation script returned error exit status 1
dpkg: sysvinit: dependency problems, but configuring anyway as you request:
sysvinit depends on initscripts; however:
Package initscripts is not configured yet.
This is because, when we switched from syscall_nr.h to syscall.tbl,
the syscall #321 has been renamed from umount to oldumount and
syscall.c has not been updated to manage the new name.
oldumount has been introduced in linux 2.1.116pre1 by:
7d32756b2 ("Import 2.1.116pre1")
...
* We now support a flag for forced unmount like the other 'big iron'
* unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
...
Fixes: 6116aea994 ("linux-user, alpha: add syscall table generation support")
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 05f03919ff07..e89b815ce983 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8028,8 +8028,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
}
}
return ret;
-#ifdef TARGET_NR_umount
+#if defined(TARGET_NR_umount) || defined(TARGET_NR_oldumount)
+#if defined(TARGET_NR_umount)
case TARGET_NR_umount:
+#endif
+#if defined(TARGET_NR_oldumount)
+ case TARGET_NR_oldumount:
+#endif
if (!(p = lock_user_string(arg1)))
return -TARGET_EFAULT;
ret = get_errno(umount(p));
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] linux-user, alpha: fix oldumount syscall
2020-05-02 19:46 [PATCH] linux-user, alpha: fix oldumount syscall Laurent Vivier
@ 2020-05-27 14:28 ` Laurent Vivier
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Vivier @ 2020-05-27 14:28 UTC (permalink / raw)
To: qemu-devel; +Cc: Riku Voipio
Le 02/05/2020 à 21:46, Laurent Vivier a écrit :
> When we try to bootstrap debian/lenny for alpha, it fails because
> it cannot umount /.root directory:
>
> ...
> Setting up initscripts (2.86.ds1-61) ...
> umount: /.root: Function not implemented
> dpkg: error processing initscripts (--configure):
> subprocess post-installation script returned error exit status 1
> dpkg: sysvinit: dependency problems, but configuring anyway as you request:
> sysvinit depends on initscripts; however:
> Package initscripts is not configured yet.
>
> This is because, when we switched from syscall_nr.h to syscall.tbl,
> the syscall #321 has been renamed from umount to oldumount and
> syscall.c has not been updated to manage the new name.
>
> oldumount has been introduced in linux 2.1.116pre1 by:
> 7d32756b2 ("Import 2.1.116pre1")
> ...
> * We now support a flag for forced unmount like the other 'big iron'
> * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
> ...
>
> Fixes: 6116aea994 ("linux-user, alpha: add syscall table generation support")
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> ---
> linux-user/syscall.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 05f03919ff07..e89b815ce983 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -8028,8 +8028,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
> }
> }
> return ret;
> -#ifdef TARGET_NR_umount
> +#if defined(TARGET_NR_umount) || defined(TARGET_NR_oldumount)
> +#if defined(TARGET_NR_umount)
> case TARGET_NR_umount:
> +#endif
> +#if defined(TARGET_NR_oldumount)
> + case TARGET_NR_oldumount:
> +#endif
> if (!(p = lock_user_string(arg1)))
> return -TARGET_EFAULT;
> ret = get_errno(umount(p));
>
Applied to my linux-user branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-27 14:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-02 19:46 [PATCH] linux-user, alpha: fix oldumount syscall Laurent Vivier
2020-05-27 14:28 ` Laurent Vivier
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).