From: Arnaud Patard Date: Tue, 21 Apr 2009 18:04:18 +0000 (+0300) Subject: Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls X-Git-Tag: 0.10.0-0sb8~15 X-Git-Url: http://git.maemo.org/git/?p=qemu;a=commitdiff_plain;h=d4fd2119d33630be345182565106ca27a8149087 Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls 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 --- diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 2a924eb..06bc387 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6586,7 +6586,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: