diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-12-23 21:31:07 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-12-23 21:31:07 +0100 |
commit | 838c669055ddbbd04998ffc345a81f6fddbb9cfe (patch) | |
tree | 1115907b1d2155b6427a3cc01db333ab8d44dcd6 /src/journal/compress.h | |
parent | d6ef10fadfe757c8f0a5664097978b4f4d0f430e (diff) | |
parent | ae5e1b19e78ed85259868d12ca8042fd2e87d423 (diff) |
Merge pull request #2158 from keszybz/journal-decompression
Journal decompression fixes
Diffstat (limited to 'src/journal/compress.h')
-rw-r--r-- | src/journal/compress.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/journal/compress.h b/src/journal/compress.h index 9a065eb763..758598730a 100644 --- a/src/journal/compress.h +++ b/src/journal/compress.h @@ -28,17 +28,20 @@ const char* object_compressed_to_string(int compression); int object_compressed_from_string(const char *compression); -int compress_blob_xz(const void *src, uint64_t src_size, void *dst, size_t *dst_size); -int compress_blob_lz4(const void *src, uint64_t src_size, void *dst, size_t *dst_size); +int compress_blob_xz(const void *src, uint64_t src_size, + void *dst, size_t dst_alloc_size, size_t *dst_size); +int compress_blob_lz4(const void *src, uint64_t src_size, + void *dst, size_t dst_alloc_size, size_t *dst_size); -static inline int compress_blob(const void *src, uint64_t src_size, void *dst, size_t *dst_size) { +static inline int compress_blob(const void *src, uint64_t src_size, + void *dst, size_t dst_alloc_size, size_t *dst_size) { int r; #ifdef HAVE_LZ4 - r = compress_blob_lz4(src, src_size, dst, dst_size); + r = compress_blob_lz4(src, src_size, dst, dst_alloc_size, dst_size); if (r == 0) return OBJECT_COMPRESSED_LZ4; #else - r = compress_blob_xz(src, src_size, dst, dst_size); + r = compress_blob_xz(src, src_size, dst, dst_alloc_size, dst_size); if (r == 0) return OBJECT_COMPRESSED_XZ; #endif |