ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
572a44
From 5d27397f97e26c9b1e9f01f041c2e68cbfb41eb3 Mon Sep 17 00:00:00 2001
572a44
From: Lukas Nykryn <lnykryn@redhat.com>
572a44
Date: Thu, 9 Jan 2014 18:00:50 +0100
572a44
Subject: [PATCH] tmpfiles: don't allow label_fix to print ENOENT when we want
572a44
 to ignore it
572a44
572a44
---
572a44
 src/tmpfiles/tmpfiles.c | 5 +----
572a44
 1 file changed, 1 insertion(+), 4 deletions(-)
572a44
572a44
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
572a44
index 239e56b..9a397af 100644
572a44
--- a/src/tmpfiles/tmpfiles.c
572a44
+++ b/src/tmpfiles/tmpfiles.c
572a44
@@ -434,8 +434,6 @@ finish:
572a44
 }
572a44
 
572a44
 static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) {
572a44
-        int r;
572a44
-
572a44
         /* not using i->path directly because it may be a glob */
572a44
         if (i->mode_set)
572a44
                 if (chmod(path, i->mode) < 0) {
572a44
@@ -456,8 +454,7 @@ static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) {
572a44
                         }
572a44
                 }
572a44
 
572a44
-        r = label_fix(path, false, false);
572a44
-        return r == -ENOENT && ignore_enoent ? 0 : r;
572a44
+        return label_fix(path, ignore_enoent, false);
572a44
 }
572a44
 
572a44
 static int item_set_perms(Item *i, const char *path) {