X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fjournald.h;h=d08a194780a1704df739545dae57cee6282fd248;hb=cee5e9a7ca75f05d4a0f7759566e657587a500d5;hp=04ebf30017c92a417ddc320da3bf1bb2b9f867fc;hpb=0d9243f022d244632b1ab26cfc8b46794b7fc5d6;p=elogind.git diff --git a/src/journal/journald.h b/src/journal/journald.h index 04ebf3001..d08a19478 100644 --- a/src/journal/journald.h +++ b/src/journal/journald.h @@ -1,7 +1,6 @@ /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -#ifndef foojournaldhfoo -#define foojournaldhfoo +#pragma once /*** This file is part of systemd. @@ -33,6 +32,15 @@ #include "journal-rate-limit.h" #include "list.h" +typedef enum Storage { + STORAGE_AUTO, + STORAGE_VOLATILE, + STORAGE_PERSISTENT, + STORAGE_NONE, + _STORAGE_MAX, + _STORAGE_INVALID = -1 +} Storage; + typedef struct StdoutStream StdoutStream; typedef struct Server { @@ -41,7 +49,7 @@ typedef struct Server { int syslog_fd; int native_fd; int stdout_fd; - int proc_kmsg_fd; + int dev_kmsg_fd; JournalFile *runtime_journal; JournalFile *system_journal; @@ -65,10 +73,6 @@ typedef struct Server { bool forward_to_syslog; bool forward_to_console; - bool import_proc_kmsg; - char proc_kmsg_buffer[LINE_MAX+1]; - size_t proc_kmsg_length; - uint64_t cached_available_space; usec_t cached_available_space_timestamp; @@ -81,9 +85,23 @@ typedef struct Server { unsigned n_stdout_streams; char *tty_path; + + int max_level_store; + int max_level_syslog; + int max_level_kmsg; + int max_level_console; + + Storage storage; + + bool dev_kmsg_readable; + + uint64_t *kernel_seqnum; } Server; /* gperf lookup function */ const struct ConfigPerfItem* journald_gperf_lookup(const char *key, unsigned length); -#endif +int config_parse_storage(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); + +const char *storage_to_string(Storage s); +Storage storage_from_string(const char *s);