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:
+1
-1
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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:
|
||||
*
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user