We want to detect that early and prevent startup. Else the daemon starts
and simply crash with panic() later.

Signed-off-by: Dietmar Maurer <[email protected]>
---
 sheep/sheep.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sheep/sheep.c b/sheep/sheep.c
index b3a12e3..307d013 100644
--- a/sheep/sheep.c
+++ b/sheep/sheep.c
@@ -20,6 +20,7 @@
 #include <linux/limits.h>
 #include <sys/syslog.h>
 #include <sys/types.h>
+#include <sys/xattr.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
@@ -258,6 +259,11 @@ int main(int argc, char **argv)
        if (ret)
                exit(1);
 
+       if ((listxattr(dir, NULL, 0) == -1) && (errno == ENOTSUP)) {
+               fprintf(stderr, "missing xattr support on %s\n", dir);
+               exit(1);
+       }
+
        ret = log_init(program_name, LOG_SPACE_SIZE, to_stdout, log_level, 
path);
        if (ret)
                exit(1);
-- 
1.7.2.5


-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to