From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwBHl-0005mh-K6 for qemu-devel@nongnu.org; Tue, 21 Apr 2009 04:24:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwBHk-0005mR-Mi for qemu-devel@nongnu.org; Tue, 21 Apr 2009 04:24:56 -0400 Received: from [199.232.76.173] (port=51678 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwBHk-0005mL-EF for qemu-devel@nongnu.org; Tue, 21 Apr 2009 04:24:56 -0400 Received: from lechat.rtp-net.org ([88.191.19.38]:58422) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LwBHj-0002Vz-Eo for qemu-devel@nongnu.org; Tue, 21 Apr 2009 04:24:55 -0400 Received: from lechat.rtp-net.org (localhost [127.0.0.1]) by lechat.rtp-net.org (Postfix) with ESMTP id 627F910087 for ; Tue, 21 Apr 2009 10:32:09 +0200 (CEST) From: Arnaud Patard (Rtp) Date: Tue, 21 Apr 2009 10:32:09 +0200 Message-ID: <871vrmflva.fsf@lechat.rtp-net.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: [Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --=-=-= 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 --- --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=xattr.patch 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: --=-=-=--