From c9bc07646100855ff8193e1e62c52b77327e264d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 3 Jul 2012 16:25:50 +0200 Subject: mount-setup: don't complain if we try to fix the label of a dir beneath a mount but can't due to EROFS --- src/shared/label.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/shared/label.c') diff --git a/src/shared/label.c b/src/shared/label.c index 9a5f79d7ae..7aa362106e 100644 --- a/src/shared/label.c +++ b/src/shared/label.c @@ -99,7 +99,7 @@ int label_init(const char *prefix) { return r; } -int label_fix(const char *path, bool ignore_enoent) { +int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { int r = 0; #ifdef HAVE_SELINUX @@ -132,6 +132,9 @@ int label_fix(const char *path, bool ignore_enoent) { if (ignore_enoent && errno == ENOENT) return 0; + if (ignore_erofs && errno == EROFS) + return 0; + log_full(security_getenforce() == 1 ? LOG_ERR : LOG_DEBUG, "Unable to fix label of %s: %m", path); r = security_getenforce() == 1 ? -errno : 0; -- cgit v1.2.3-54-g00ecf