chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
coredump: make compression configurable
[elogind.git]
/
src
/
journal
/
compress.c
diff --git
a/src/journal/compress.c
b/src/journal/compress.c
index f36c4308017283540aeecc0a87416efa198ca9b3..1fc62ead2a9b68ca9c4489d840d66a8dff7c0406 100644
(file)
--- a/
src/journal/compress.c
+++ b/
src/journal/compress.c
@@
-203,7
+203,7
@@
fail:
return b;
}
return b;
}
-int compress_stream(int fdf, int fdt, off_t max_bytes) {
+int compress_stream(int fdf, int fdt,
uint32_t preset,
off_t max_bytes) {
_cleanup_(lzma_end) lzma_stream s = LZMA_STREAM_INIT;
lzma_ret ret;
_cleanup_(lzma_end) lzma_stream s = LZMA_STREAM_INIT;
lzma_ret ret;
@@
-213,7
+213,7
@@
int compress_stream(int fdf, int fdt, off_t max_bytes) {
assert(fdf >= 0);
assert(fdt >= 0);
assert(fdf >= 0);
assert(fdt >= 0);
- ret = lzma_easy_encoder(&s,
LZMA_PRESET_DEFAULT
, LZMA_CHECK_CRC64);
+ ret = lzma_easy_encoder(&s,
preset
, LZMA_CHECK_CRC64);
if (ret != LZMA_OK) {
log_error("Failed to initialize XZ encoder: code %d", ret);
return -EINVAL;
if (ret != LZMA_OK) {
log_error("Failed to initialize XZ encoder: code %d", ret);
return -EINVAL;