From 2bc70843156c342f763512043e2178f18e1297a5 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 30 Aug 2011 19:20:18 +0200 Subject: [PATCH] Adaptions and remarks about GNU/Hurd --- libisofs/aaip-os-linux.c | 8 ++++++-- libisofs/aaip_0_2.c | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/libisofs/aaip-os-linux.c b/libisofs/aaip-os-linux.c index ede44fc..a01b2ca 100644 --- a/libisofs/aaip-os-linux.c +++ b/libisofs/aaip-os-linux.c @@ -216,8 +216,12 @@ int aaip_get_attr_list(char *path, size_t *num_attrs, char ***names, list_size= listxattr(path, list, 0); else list_size= llistxattr(path, list, 0); - if(list_size == -1) - {ret= -1; goto ex;} + 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;} + } if(list_size > 0) { list= calloc(list_size, 1); if(list == NULL) diff --git a/libisofs/aaip_0_2.c b/libisofs/aaip_0_2.c index 48062b8..ecadc51 100644 --- a/libisofs/aaip_0_2.c +++ b/libisofs/aaip_0_2.c @@ -2186,6 +2186,13 @@ ex:; #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 #include "aaip-os-dummy.c"