journal: move the {DATA,ENTRY}_SIZE constants to sd-journal

So we can access them from the code there as well.
This commit is contained in:
Frantisek Sumsal
2026-04-12 16:10:03 +02:00
parent 53c87c096c
commit d830bb1fc1
5 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
#include "install.h"
#include "iterator.h"
#include "job.h"
#include "journal-importer.h"
#include "journal-def.h"
#include "list.h"
#include "log.h"
#include "log-context.h"
+1 -1
View File
@@ -3,7 +3,7 @@
#include "conf-parser.h"
#include "coredump-config.h"
#include "format-util.h"
#include "journal-importer.h"
#include "journal-def.h"
#include "log.h"
#include "string-table.h"
#include "string-util.h"
-1
View File
@@ -10,7 +10,6 @@
#include "fd-util.h"
#include "format-util.h"
#include "iovec-util.h"
#include "journal-importer.h"
#include "journal-internal.h"
#include "journald-client.h"
#include "journald-console.h"
+15
View File
@@ -6,6 +6,21 @@
#include "sd-forward.h"
#include "sparse-endian.h"
/* Make sure not to make this smaller than the maximum coredump size.
* See JOURNAL_SIZE_MAX in coredump-config.h */
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#define ENTRY_SIZE_MAX (1024*1024*770u)
#define ENTRY_SIZE_UNPRIV_MAX (1024*1024*32u)
#define DATA_SIZE_MAX (1024*1024*768u)
#else
#define ENTRY_SIZE_MAX (1024*1024*13u)
#define ENTRY_SIZE_UNPRIV_MAX (1024*1024*8u)
#define DATA_SIZE_MAX (1024*1024*11u)
#endif
/* The maximum number of fields in an entry */
#define ENTRY_FIELD_COUNT_MAX 1024u
/*
* If you change this file you probably should also change its documentation:
*
-14
View File
@@ -8,22 +8,8 @@
#include "iovec-wrapper.h"
#include "time-util.h"
/* Make sure not to make this smaller than the maximum coredump size.
* See JOURNAL_SIZE_MAX in coredump.c */
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#define ENTRY_SIZE_MAX (1024*1024*770u)
#define ENTRY_SIZE_UNPRIV_MAX (1024*1024*32u)
#define DATA_SIZE_MAX (1024*1024*768u)
#else
#define ENTRY_SIZE_MAX (1024*1024*13u)
#define ENTRY_SIZE_UNPRIV_MAX (1024*1024*8u)
#define DATA_SIZE_MAX (1024*1024*11u)
#endif
#define LINE_CHUNK 8*1024u
/* The maximum number of fields in an entry */
#define ENTRY_FIELD_COUNT_MAX 1024u
typedef struct JournalImporter {
int fd;
bool passive_fd;