chiark / gitweb /
label: don't fail miserably if filesystem doesn't do xattrs/labels
authorLennart Poettering <lennart@poettering.net>
Tue, 19 Oct 2010 17:35:35 +0000 (19:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 19 Oct 2010 17:35:35 +0000 (19:35 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=642664

src/label.c

index fb570c5..809b1ee 100644 (file)
@@ -83,6 +83,10 @@ int label_fix(const char *path) {
                 if (r == 0) {
                         r = setfilecon(path, fcon);
                         freecon(fcon);
+
+                        /* If the FS doesn't support labels, then exit without warning */
+                        if (r < 0 && errno == ENOTSUP)
+                                return 0;
                 }
         }