From: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls
Date: Tue, 21 Apr 2009 10:32:09 +0200 [thread overview]
Message-ID: <871vrmflva.fsf@lechat.rtp-net.org> (raw)
[-- 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:
next reply other threads:[~2009-04-21 8:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-21 8:32 Arnaud Patard [this message]
2009-04-21 10:23 ` [Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls François Revol
2009-04-21 18:08 ` Riku Voipio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871vrmflva.fsf@lechat.rtp-net.org \
--to=arnaud.patard@rtp-net.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).