]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: use -EPROTONOSUPPORT for unknown compression
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 17 Jul 2020 19:51:40 +0000 (21:51 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 21 Jul 2020 15:42:15 +0000 (17:42 +0200)
We might add more compression types in the future, and we should treat that
as unsupported, and not a format error.

src/journal/compress.c

index e6ce64fc6529efafa2c9717c92b94f83d879be37..1b0c01a8fb32e98b6c002c517dbb2e005626fb26 100644 (file)
@@ -326,7 +326,7 @@ int decompress_blob(
                                 src, src_size,
                                 dst, dst_alloc_size, dst_size, dst_max);
         else
-                return -EBADMSG;
+                return -EPROTONOSUPPORT;
 }
 
 int decompress_startswith_xz(const void *src, uint64_t src_size,