qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user: Handle arches with llseek instead of _llseek
@ 2014-03-25 21:51 James Hogan
  2014-03-26  1:14 ` Jia Liu
  0 siblings, 1 reply; 2+ messages in thread
From: James Hogan @ 2014-03-25 21:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, James Hogan, Jia Liu

Recently merged kernel ports (such as OpenRISC and Meta) have an llseek
system call instead of _llseek. This is handled for the host
architecture by defining __NR__llseek as __NR_llseek, but not for the
target architecture.

Handle it in the same way for these architectures, defining
TARGET_NR__llseek as TARGET_NR_llseek.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Riku Voipio <riku.voipio@iki.fi>
Cc: Jia Liu <proljc@gmail.com>
---
 linux-user/syscall.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 2eac6d5..8dbe39b 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -198,6 +198,11 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,	\
 #define __NR__llseek __NR_lseek
 #endif
 
+/* Newer kernel ports have llseek() instead of _llseek() */
+#if defined(TARGET_NR_llseek) && !defined(TARGET_NR__llseek)
+#define TARGET_NR__llseek TARGET_NR_llseek
+#endif
+
 #ifdef __NR_gettid
 _syscall0(int, gettid)
 #else
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: Handle arches with llseek instead of _llseek
  2014-03-25 21:51 [Qemu-devel] [PATCH] linux-user: Handle arches with llseek instead of _llseek James Hogan
@ 2014-03-26  1:14 ` Jia Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Jia Liu @ 2014-03-26  1:14 UTC (permalink / raw)
  To: James Hogan; +Cc: Riku Voipio, qemu-devel@nongnu.org

Hi James,

On Wed, Mar 26, 2014 at 5:51 AM, James Hogan <james.hogan@imgtec.com> wrote:
> Recently merged kernel ports (such as OpenRISC and Meta) have an llseek
> system call instead of _llseek. This is handled for the host
> architecture by defining __NR__llseek as __NR_llseek, but not for the
> target architecture.

Thank you, James.

I don't have a Linux test environment for I'm a OS X user,
may you please make a test, please?


>
> Handle it in the same way for these architectures, defining
> TARGET_NR__llseek as TARGET_NR_llseek.
>
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Riku Voipio <riku.voipio@iki.fi>
> Cc: Jia Liu <proljc@gmail.com>
> ---
>  linux-user/syscall.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 2eac6d5..8dbe39b 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -198,6 +198,11 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,  \
>  #define __NR__llseek __NR_lseek
>  #endif
>
> +/* Newer kernel ports have llseek() instead of _llseek() */
> +#if defined(TARGET_NR_llseek) && !defined(TARGET_NR__llseek)
> +#define TARGET_NR__llseek TARGET_NR_llseek
> +#endif
> +
>  #ifdef __NR_gettid
>  _syscall0(int, gettid)
>  #else
> --
> 1.8.3.2
>

Regards,
Jia

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-26  1:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-25 21:51 [Qemu-devel] [PATCH] linux-user: Handle arches with llseek instead of _llseek James Hogan
2014-03-26  1:14 ` Jia Liu

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).