[systemd-devel] [PATCH] journal: don't try to compress without XZ
Michael Olbrich
m.olbrich at pengutronix.de
Mon Sep 3 06:46:44 PDT 2012
otherwise the header contains the HEADER_INCOMPATIBLE_COMPRESSED
flag even though the data is not compressed and reading the journal
fails.
---
Hi,
I'm not sure if this is the correct place to do this, but the default
'compress = yes' must be ignored somewhere otherwise journalctl will not
work with the default configuration and XZ support disabled.
Regards,
Michael
src/journal/journal-file.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 79f7598..81ba45c 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -2007,7 +2007,9 @@ int journal_file_open(
f->flags = flags;
f->prot = prot_from_flags(flags);
f->writable = (flags & O_ACCMODE) != O_RDONLY;
+#ifdef HAVE_XZ
f->compress = compress;
+#endif
f->seal = seal;
if (mmap_cache)
--
1.7.10.4
More information about the systemd-devel
mailing list