qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* sys


From: Rtp
Subject: [Qemu-devel] [PATCH] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls
Date: Tue, 21 Apr 2009 10:32:09 +0200

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 <address@hidden>
---
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:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]