From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwKOR-0000R7-Nd for qemu-devel@nongnu.org; Tue, 21 Apr 2009 14:08:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwKOR-0000Ph-06 for qemu-devel@nongnu.org; Tue, 21 Apr 2009 14:08:27 -0400 Received: from [199.232.76.173] (port=59485 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwKOQ-0000Pb-OQ for qemu-devel@nongnu.org; Tue, 21 Apr 2009 14:08:26 -0400 Received: from naru.obs2.net ([84.20.150.76]:38392) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LwKOQ-0003tT-4i for qemu-devel@nongnu.org; Tue, 21 Apr 2009 14:08:26 -0400 Date: Tue, 21 Apr 2009 21:08:24 +0300 From: Riku Voipio Subject: Re: [Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls Message-ID: <20090421180824.GB17579@kos.to> References: <871vrmflva.fsf@lechat.rtp-net.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871vrmflva.fsf@lechat.rtp-net.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Arnaud Patard Cc: qemu-devel@nongnu.org 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 > 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: