Re: [Qemu-devel] [PATCH v7 03/10] linux-user: Add support for syncfs() syscall

2016-10-07 Thread Aleksandar Markovic
Hello, Riku,

Thanks a lot for following up. I'm glad I now know the lowest version among 
supported glibcs. Would you like me to make a new version of two patches that 
you mentioned using detection in configure as you described, or perhaps you had 
something else in mind?

Thanks,
Aleksandar



From: Riku Voipio [riku.voi...@iki.fi]
Sent: Friday, October 07, 2016 6:06 AM
To: Aleksandar Markovic
Cc: qemu-devel@nongnu.org; laur...@vivier.eu; peter.mayd...@linaro.org; Petar 
Jovanovic; Miodrag Dinic; Aleksandar Rikalo; Aleksandar Markovic
Subject: Re: [Qemu-devel] [PATCH v7 03/10] linux-user: Add support for syncfs() 
syscall

On Thu, Sep 22, 2016 at 06:56:52PM +0200, Aleksandar Markovic wrote:
> From: Aleksandar Markovic 
>
> This patch implements syncfs() syscall support. The implementation
> consists of a straightforward invocation of host's syncfs() only.
>
> Signed-off-by: Aleksandar Markovic 
> ---
>  linux-user/syscall.c | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 9f11ca2..1af3e10 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -8069,6 +8069,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long 
> arg1,
>  sync();
>  ret = 0;
>  break;
> +#if defined(TARGET_NR_syncfs)
> +case TARGET_NR_syncfs:
> +ret = get_errno(syncfs(arg1));
> +break;
> +#endif

When compiling on Suse11:

linux-user/syscall.o: In function `do_syscall':
/work/linux-user/syscall.c:8090: undefined reference to `syncfs'

library support was added to glibc in version 2.14, which newer than
the glibc in the oldest distros qemu building is still supported (2.11
in Sles11).

CONFIG_SYNCFS checki and guard needed.

Riku

>  case TARGET_NR_kill:
>  ret = get_errno(safe_kill(arg1, target_to_host_signal(arg2)));
>  break;
> --
> 2.9.3
>



Re: [Qemu-devel] [PATCH v7 03/10] linux-user: Add support for syncfs() syscall

2016-10-07 Thread Riku Voipio
On Thu, Sep 22, 2016 at 06:56:52PM +0200, Aleksandar Markovic wrote:
> From: Aleksandar Markovic 
> 
> This patch implements syncfs() syscall support. The implementation
> consists of a straightforward invocation of host's syncfs() only.
> 
> Signed-off-by: Aleksandar Markovic 
> ---
>  linux-user/syscall.c | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 9f11ca2..1af3e10 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -8069,6 +8069,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long 
> arg1,
>  sync();
>  ret = 0;
>  break;
> +#if defined(TARGET_NR_syncfs)
> +case TARGET_NR_syncfs:
> +ret = get_errno(syncfs(arg1));
> +break;
> +#endif

When compiling on Suse11:

linux-user/syscall.o: In function `do_syscall':
/work/linux-user/syscall.c:8090: undefined reference to `syncfs'

library support was added to glibc in version 2.14, which newer than
the glibc in the oldest distros qemu building is still supported (2.11
in Sles11).

CONFIG_SYNCFS checki and guard needed.

Riku

>  case TARGET_NR_kill:
>  ret = get_errno(safe_kill(arg1, target_to_host_signal(arg2)));
>  break;
> -- 
> 2.9.3
> 



[Qemu-devel] [PATCH v7 03/10] linux-user: Add support for syncfs() syscall

2016-09-22 Thread Aleksandar Markovic
From: Aleksandar Markovic 

This patch implements syncfs() syscall support. The implementation
consists of a straightforward invocation of host's syncfs() only.

Signed-off-by: Aleksandar Markovic 
---
 linux-user/syscall.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 9f11ca2..1af3e10 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8069,6 +8069,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long 
arg1,
 sync();
 ret = 0;
 break;
+#if defined(TARGET_NR_syncfs)
+case TARGET_NR_syncfs:
+ret = get_errno(syncfs(arg1));
+break;
+#endif
 case TARGET_NR_kill:
 ret = get_errno(safe_kill(arg1, target_to_host_signal(arg2)));
 break;
-- 
2.9.3