summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2008-03-20 01:24:24 +0100
committerDavid Härdeman <david@hardeman.nu>2008-03-20 01:24:24 +0100
commit84e8f95743199deec9db0a87da517252af3cd6d8 (patch)
tree1fd001d2eb99300df926b6ca6dd14dc4557875f7
parent8c886bd5e631628b3de21f67455a6616c2447cb2 (diff)
Detect whether the underlying FS supports xattrs
No support for xattrs is treated the same as a file having no xattrs on a file system which does support xattrs. This should fix Debian BR #470184
-rw-r--r--metaentry.c4
-rw-r--r--metaentry.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/metaentry.c b/metaentry.c
index 0277c28..efd8d3a 100644
--- a/metaentry.c
+++ b/metaentry.c
@@ -220,6 +220,10 @@ mentry_create(const char *path)
lsize = listxattr(path, NULL, 0);
if (lsize < 0) {
+ /* Perhaps the FS doesn't support xattrs? */
+ if (errno == ENOTSUP)
+ return mentry;
+
msg(MSG_ERROR, "listxattr failed for %s: %s\n",
path, strerror(errno));
return NULL;
diff --git a/metaentry.h b/metaentry.h
index c2c9e01..22f061e 100644
--- a/metaentry.h
+++ b/metaentry.h
@@ -18,7 +18,7 @@
*
*/
-/* Data structure to hold all metadata for a file */
+/* Data structure to hold all metadata for a file/dir */
struct metaentry {
struct metaentry *next;
char *path;