diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/journald-fix-vacuuming-of-archived-journals.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/journald-fix-vacuuming-of-archived-journals.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/journald-fix-vacuuming-of-archived-journals.patch b/meta/recipes-core/systemd/systemd/journald-fix-vacuuming-of-archived-journals.patch new file mode 100644 index 0000000000..7c59200999 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/journald-fix-vacuuming-of-archived-journals.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | journald: fix vacuuming of archived journals | ||
2 | d_name is modified on line 227 so if the entire journal name is needed | ||
3 | again p must be used. Before this change when journal_file_empty was called | ||
4 | on archived journals it would always return with -2. | ||
5 | |||
6 | Signed-off-by: George McCollister <george.mccollister@gmail.com> | ||
7 | |||
8 | Index: systemd-206/src/journal/journal-vacuum.c | ||
9 | =================================================================== | ||
10 | --- systemd-206.orig/src/journal/journal-vacuum.c 2014-01-29 20:43:27.492343295 -0200 | ||
11 | +++ systemd-206/src/journal/journal-vacuum.c 2014-01-29 20:48:55.076356876 -0200 | ||
12 | @@ -265,18 +265,18 @@ | ||
13 | /* We do not vacuum active files or unknown files! */ | ||
14 | continue; | ||
15 | |||
16 | - if (journal_file_empty(dirfd(d), de->d_name)) { | ||
17 | + if (journal_file_empty(dirfd(d), p)) { | ||
18 | |||
19 | /* Always vacuum empty non-online files. */ | ||
20 | |||
21 | - if (unlinkat(dirfd(d), de->d_name, 0) >= 0) | ||
22 | - log_debug("Deleted empty journal %s/%s.", directory, de->d_name); | ||
23 | + if (unlinkat(dirfd(d), p, 0) >= 0) | ||
24 | + log_debug("Deleted empty journal %s/%s.", directory, p); | ||
25 | else if (errno != ENOENT) | ||
26 | - log_warning("Failed to delete %s/%s: %m", directory, de->d_name); | ||
27 | + log_warning("Failed to delete %s/%s: %m", directory, p); | ||
28 | continue; | ||
29 | } | ||
30 | |||
31 | - patch_realtime(directory, de->d_name, &st, &realtime); | ||
32 | + patch_realtime(directory, p, &st, &realtime); | ||
33 | |||
34 | GREEDY_REALLOC(list, n_allocated, n_list + 1); | ||
35 | |||
36 | |||
37 | Upstream-Status: Backport [207] | ||