summaryrefslogtreecommitdiffstats
path: root/src/basic/compress.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-04-20 16:06:14 +0200
committerLennart Poettering <lennart@poettering.net>2022-04-26 21:55:49 +0200
commit4d698d12de08997bf077328758a8711ba6479f52 (patch)
treec5f3befafeb5374a64b9a6f56e97cbe1e0981d4c /src/basic/compress.h
parentbasic: move compress.[ch] → src/basic/ (diff)
downloadsystemd-4d698d12de08997bf077328758a8711ba6479f52.tar.xz
systemd-4d698d12de08997bf077328758a8711ba6479f52.zip
compress: make Compression a regular non-sparse enum
Given we have two different types for the journal object flags and the Compression enum, let's make the latter a regular non-sparse enum, and thus remove some surprises. We have to convert anyway between the two, and already do via COMPRESSION_FROM_OBJECT().
Diffstat (limited to 'src/basic/compress.h')
-rw-r--r--src/basic/compress.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/basic/compress.h b/src/basic/compress.h
index c384380b64..fc817d219d 100644
--- a/src/basic/compress.h
+++ b/src/basic/compress.h
@@ -4,12 +4,10 @@
#include <unistd.h>
typedef enum Compression {
- /* These are defined the same way as the relevant object types in journal-def.h,
- * i.e. OBJECT_COMPRESSED_XZ, … */
- COMPRESSION_NONE = 0,
- COMPRESSION_XZ = 1,
- COMPRESSION_LZ4 = 2,
- COMPRESSION_ZSTD = 4,
+ COMPRESSION_NONE,
+ COMPRESSION_XZ,
+ COMPRESSION_LZ4,
+ COMPRESSION_ZSTD,
_COMPRESSION_MAX,
_COMPRESSION_INVALID = -EINVAL,
} Compression;