Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls
PATCH 1/1 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.
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 :).
---
linux-user/syscall.c +2 -1
@@ -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_areacase TARGET_NR_set_thread_area:
Quoted 11 lines
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-EOPNOTSUPPand make ls happy.
Quoted 4 lines
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 :).
Possibly to avoid endianness issues with binary data ?
François.
Quoted 6 lines · Arnaud Patard
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-EOPNOTSUPPand make ls happy.
Looks ok to me.
Quoted 3 lines
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.
Quoted 16 lines
---
linux-user/syscall.c +2
-1@@ -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_areacase TARGET_NR_set_thread_area: