]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/journal/journal-file.h
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / journal / journal-file.h
index 9ad601335928de88bbdd1f7178ed4115c2876222..c652687c4521e858ecc09f144384e912594cf3e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
 /***
@@ -21,7 +22,7 @@
 
 #include <inttypes.h>
 
-#ifdef HAVE_GCRYPT
+#if HAVE_GCRYPT
 #include <gcrypt.h>
 #endif
 
@@ -75,6 +76,7 @@ typedef enum OfflineState {
 
 typedef struct JournalFile {
         int fd;
+        MMapFileDescriptor *cache_fd;
 
         mode_t mode;
 
@@ -85,6 +87,8 @@ typedef struct JournalFile {
         bool compress_lz4:1;
         bool seal:1;
         bool defrag_on_close:1;
+        bool close_fd:1;
+        bool archive:1;
 
         bool tail_entry_monotonic_valid:1;
 
@@ -118,12 +122,12 @@ typedef struct JournalFile {
         pthread_t offline_thread;
         volatile OfflineState offline_state;
 
-#if defined(HAVE_XZ) || defined(HAVE_LZ4)
+#if HAVE_XZ || HAVE_LZ4
         void *compress_buffer;
         size_t compress_buffer_size;
 #endif
 
-#ifdef HAVE_GCRYPT
+#if HAVE_GCRYPT
         gcry_md_hd_t hmac;
         bool hmac_running;
 
@@ -142,6 +146,7 @@ typedef struct JournalFile {
 } JournalFile;
 
 int journal_file_open(
+                int fd,
                 const char *fname,
                 int flags,
                 mode_t mode,