summaryrefslogtreecommitdiffstats
path: root/src/journal/journal-file.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-06-24 16:33:41 +0200
committerLennart Poettering <lennart@poettering.net>2020-06-25 15:02:45 +0200
commitd80b051cea90376ed8a202a7567facbc1410b9ae (patch)
tree97ab5e24e8d1c1293a5e8986fd8096cd8a641bc7 /src/journal/journal-file.c
parentdocs: document the new journal file format additions (diff)
downloadsystemd-d80b051cea90376ed8a202a7567facbc1410b9ae.tar.xz
systemd-d80b051cea90376ed8a202a7567facbc1410b9ae.zip
tree-wide: add new HAVE_COMPRESSION compile time flag
let's simplify the checks for ZSTD/LZ4/XZ As suggested: https://github.com/systemd/systemd/pull/16096#discussion_r440705585
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r--src/journal/journal-file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index ec2006bca2..9a08de1ba4 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -392,7 +392,7 @@ JournalFile* journal_file_close(JournalFile *f) {
ordered_hashmap_free_free(f->chain_cache);
-#if HAVE_XZ || HAVE_LZ4 || HAVE_ZSTD
+#if HAVE_COMPRESSION
free(f->compress_buffer);
#endif
@@ -1455,7 +1455,7 @@ int journal_file_find_data_object_with_hash(
goto next;
if (o->object.flags & OBJECT_COMPRESSION_MASK) {
-#if HAVE_XZ || HAVE_LZ4 || HAVE_ZSTD
+#if HAVE_COMPRESSION
uint64_t l;
size_t rsize = 0;
@@ -1624,7 +1624,7 @@ static int journal_file_append_data(
o->data.hash = htole64(hash);
-#if HAVE_XZ || HAVE_LZ4 || HAVE_ZSTD
+#if HAVE_COMPRESSION
if (JOURNAL_FILE_COMPRESS(f) && size >= f->compress_threshold_bytes) {
size_t rsize = 0;
@@ -3852,7 +3852,7 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6
return -E2BIG;
if (o->object.flags & OBJECT_COMPRESSION_MASK) {
-#if HAVE_XZ || HAVE_LZ4 || HAVE_ZSTD
+#if HAVE_COMPRESSION
size_t rsize = 0;
r = decompress_blob(o->object.flags & OBJECT_COMPRESSION_MASK,