Adaptions and remarks about GNU/Hurd

This commit is contained in:
Thomas Schmitt 2011-08-30 19:20:18 +02:00
parent 6d10908a58
commit 2bc7084315
2 changed files with 13 additions and 2 deletions

View File

@ -216,8 +216,12 @@ int aaip_get_attr_list(char *path, size_t *num_attrs, char ***names,
list_size= listxattr(path, list, 0); list_size= listxattr(path, list, 0);
else else
list_size= llistxattr(path, list, 0); list_size= llistxattr(path, list, 0);
if(list_size == -1) if(list_size == -1) {
if(errno == ENOSYS) /* Function not implemented */
list_size= 0; /* Handle as if xattr was disabled at compile time */
else
{ret= -1; goto ex;} {ret= -1; goto ex;}
}
if(list_size > 0) { if(list_size > 0) {
list= calloc(list_size, 1); list= calloc(list_size, 1);
if(list == NULL) if(list == NULL)

View File

@ -2186,6 +2186,13 @@ ex:;
#include "aaip-os-linux.c" #include "aaip-os-linux.c"
/* August 2011: aaip-os-linux.c would also work for GNU/Hurd : ifdef __GNU__
Libraries and headers are present on Debian GNU/Hurd but there is no
ACL or xattr support in the filesystems yet.
Further, llistxattr() produces ENOSYS "Function not implemented".
So it makes few sense to enable it here.
*/
#else #else
#include "aaip-os-dummy.c" #include "aaip-os-dummy.c"