diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-07-03 16:25:50 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-07-03 16:25:50 +0200 |
commit | c9bc07646100855ff8193e1e62c52b77327e264d (patch) | |
tree | 41a37615bb323ff5c6a5a212209ae12e6ec1b054 /src/shared/label.c | |
parent | 61b1477c8107e9b7143be9acf6bf678fa9d0674d (diff) |
mount-setup: don't complain if we try to fix the label of a dir beneath a mount but can't due to EROFS
Diffstat (limited to 'src/shared/label.c')
-rw-r--r-- | src/shared/label.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |