summaryrefslogtreecommitdiff
path: root/src/tmpfiles
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-01-18 16:07:45 +0100
committerLennart Poettering <lennart@poettering.net>2019-02-15 17:16:54 +0100
commit781bc44e831e8bc114d2e1d979e244ee774df647 (patch)
treebc0264edf4f9be0769a2c1642cd0e039bc42f79e /src/tmpfiles
parenta23fabc6978c85ad128e3c74424b7254928513d6 (diff)
downloadsystemd-781bc44e831e8bc114d2e1d979e244ee774df647.tar.gz
systemd-781bc44e831e8bc114d2e1d979e244ee774df647.tar.bz2
systemd-781bc44e831e8bc114d2e1d979e244ee774df647.zip
tmpfiles: make some log messages a tiny bit less cryptic for mere mortals
Diffstat (limited to 'src/tmpfiles')
-rw-r--r--src/tmpfiles/tmpfiles.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 4bf148ef3d..c1506710e6 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -583,7 +583,7 @@ static int dir_cleanup(
if (mountpoint &&
streq(dent->d_name, "lost+found") &&
s.st_uid == 0) {
- log_debug("Ignoring \"%s\".", sub_path);
+ log_debug("Ignoring directory \"%s\".", sub_path);
continue;
}
@@ -596,7 +596,7 @@ static int dir_cleanup(
sub_dir = xopendirat_nomod(dirfd(d), dent->d_name);
if (!sub_dir) {
if (errno != ENOENT)
- r = log_error_errno(errno, "opendir(%s) failed: %m", sub_path);
+ r = log_warning_errno(errno, "Opening directory \"%s\" failed, ignoring: %m", sub_path);
continue;
}
@@ -612,7 +612,7 @@ static int dir_cleanup(
* that. */
if (keep_this_level) {
- log_debug("Keeping \"%s\".", sub_path);
+ log_debug("Keeping directory \"%s\".", sub_path);
continue;
}
@@ -639,7 +639,7 @@ static int dir_cleanup(
log_debug("Removing directory \"%s\".", sub_path);
if (unlinkat(dirfd(d), dent->d_name, AT_REMOVEDIR) < 0)
if (!IN_SET(errno, ENOENT, ENOTEMPTY))
- r = log_error_errno(errno, "rmdir(%s): %m", sub_path);
+ r = log_warning_errno(errno, "Failed to remove directory \"%s\", ignoring: %m", sub_path);
} else {
/* Skip files for which the sticky bit is set. These are semantics we define, and are
@@ -704,11 +704,10 @@ static int dir_cleanup(
continue;
}
- log_debug("unlink \"%s\"", sub_path);
-
+ log_debug("Removing \"%s\".", sub_path);
if (unlinkat(dirfd(d), dent->d_name, 0) < 0)
if (errno != ENOENT)
- r = log_error_errno(errno, "unlink(%s): %m", sub_path);
+ r = log_warning_errno(errno, "Failed to remove \"%s\", ignoring: %m", sub_path);
deleted = true;
}