summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-04-28 05:06:48 +0200
committerLennart Poettering <lennart@poettering.net>2011-04-28 05:06:48 +0200
commitb4bd51448fa8b7574e9a92af50b58da9bb0dfb5e (patch)
treec164de08b25eb521acd95c741657a4ddd7d11873 /src
parent6dfa54942c44201b78528d9812313fdb80641e1f (diff)
label: don't print warning when we try ro relabel an non-existing file
https://bugzilla.redhat.com/show_bug.cgi?id=698674
Diffstat (limited to 'src')
-rw-r--r--src/label.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/label.c b/src/label.c
index 09ded642fb..43f6e89fa5 100644
--- a/src/label.c
+++ b/src/label.c
@@ -90,14 +90,14 @@ int label_fix(const char *path, bool ignore_enoent) {
/* If the FS doesn't support labels, then exit without warning */
if (r < 0 && errno == ENOTSUP)
return 0;
-
- /* Ignore ENOENT in some cases */
- if (r < 0 && ignore_enoent && errno == ENOENT)
- return 0;
}
}
if (r < 0) {
+ /* Ignore ENOENT in some cases */
+ if (ignore_enoent && errno == ENOENT)
+ 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;