[sheepdog] [PATCH 1/2] sheepfs: check xattr support at startup

Liu Yuan namei.unix at gmail.com
Fri Sep 13 21:26:52 CEST 2013


Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 sheepfs/core.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sheepfs/core.c b/sheepfs/core.c
index 1482596..d8b92e3 100644
--- a/sheepfs/core.c
+++ b/sheepfs/core.c
@@ -369,8 +369,13 @@ int main(int argc, char **argv)
 		fprintf(stderr, "%m\n");
 		exit(1);
 	}
+	if (!is_xattr_enabled(cwd)) {
+		fprintf(stderr, "%s doesn't support xattr\n", cwd);
+		exit(1);
+	}
 	strbuf_addf(&path, "%s/%s", cwd, ".sheepfs");
 	free(cwd);
+
 	memcpy(sheepfs_shadow, path.buf, path.len);
 	if (xmkdir(sheepfs_shadow, 0755) < 0) {
 		fprintf(stderr, "%m\n");
-- 
1.7.9.5




More information about the sheepdog mailing list