* [Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls
@ 2009-04-21 8:32 Arnaud Patard
2009-04-21 10:23 ` François Revol
2009-04-21 18:08 ` Riku Voipio
0 siblings, 2 replies; 3+ messages in thread
From: Arnaud Patard @ 2009-04-21 8:32 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 602 bytes --]
In current code, we're sending ENOSYS to target when a syscall for the
xattrs is done. This makes applications like ls complain loudly about
that and breaks scripts parsing the output. Moreover, iirc, implemented
features of filesystems are are sending EOPNOTSUPP (I've not checked so
I may be a little bit wrong on that...).
So, I'm proposing to return -EOPNOTSUPP and make ls happy.
As a side not, I'd like to know if there's a reason for not having
implemented the *xattr* syscalls support. If someone has a clue, please
share it :).
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
---
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: xattr.patch --]
[-- Type: text/x-diff, Size: 484 bytes --]
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index ec04170..a036dd4 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6279,7 +6279,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
case TARGET_NR_removexattr:
case TARGET_NR_lremovexattr:
case TARGET_NR_fremovexattr:
- goto unimplemented_nowarn;
+ ret = -TARGET_EOPNOTSUPP;
+ break;
#endif
#ifdef TARGET_NR_set_thread_area
case TARGET_NR_set_thread_area:
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls
2009-04-21 8:32 [Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls Arnaud Patard
@ 2009-04-21 10:23 ` François Revol
2009-04-21 18:08 ` Riku Voipio
1 sibling, 0 replies; 3+ messages in thread
From: François Revol @ 2009-04-21 10:23 UTC (permalink / raw)
To: Arnaud Patard (Rtp); +Cc: qemu-devel
>
> In current code, we're sending ENOSYS to target when a syscall for
> the
> xattrs is done. This makes applications like ls complain loudly about
> that and breaks scripts parsing the output. Moreover, iirc,
> implemented
> features of filesystems are are sending EOPNOTSUPP (I've not checked
> so
> I may be a little bit wrong on that...).
> So, I'm proposing to return -EOPNOTSUPP and make ls happy.
>
> As a side not, I'd like to know if there's a reason for not having
> implemented the *xattr* syscalls support. If someone has a clue,
> please
> share it :).
Possibly to avoid endianness issues with binary data ?
François.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls
2009-04-21 8:32 [Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls Arnaud Patard
2009-04-21 10:23 ` François Revol
@ 2009-04-21 18:08 ` Riku Voipio
1 sibling, 0 replies; 3+ messages in thread
From: Riku Voipio @ 2009-04-21 18:08 UTC (permalink / raw)
To: Arnaud Patard; +Cc: qemu-devel
On Tue, Apr 21, 2009 at 10:32:09AM +0200, Arnaud Patard wrote:
> In current code, we're sending ENOSYS to target when a syscall for the
> xattrs is done. This makes applications like ls complain loudly about
> that and breaks scripts parsing the output. Moreover, iirc, implemented
> features of filesystems are are sending EOPNOTSUPP (I've not checked so
> I may be a little bit wrong on that...).
> So, I'm proposing to return -EOPNOTSUPP and make ls happy.
Looks ok to me.
Acked-By: Riku Voipio <riku.voipio@iki.fi>
> As a side not, I'd like to know if there's a reason for not having
> implemented the *xattr* syscalls support. If someone has a clue, please
> share it :).
I guess nobody has just needed extended attributes and linux-user qemu
so far.
> ---
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index ec04170..a036dd4 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -6279,7 +6279,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
> case TARGET_NR_removexattr:
> case TARGET_NR_lremovexattr:
> case TARGET_NR_fremovexattr:
> - goto unimplemented_nowarn;
> + ret = -TARGET_EOPNOTSUPP;
> + break;
> #endif
> #ifdef TARGET_NR_set_thread_area
> case TARGET_NR_set_thread_area:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-21 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-21 8:32 [Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls Arnaud Patard
2009-04-21 10:23 ` François Revol
2009-04-21 18:08 ` Riku Voipio
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).