journal: Remove circular header dependencies
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "iovec-util.h"
|
||||
#include "journal-internal.h"
|
||||
#include "journald-audit.h"
|
||||
#include "journald-server.h"
|
||||
#include "missing_audit.h"
|
||||
#include "string-util.h"
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "journald-server.h"
|
||||
#include "socket-util.h"
|
||||
|
||||
typedef struct Server Server;
|
||||
|
||||
void server_process_audit_message(Server *s, const void *buffer, size_t buffer_size, const struct ucred *ucred, const union sockaddr_union *sa, socklen_t salen);
|
||||
|
||||
void process_audit_string(Server *s, int type, const char *data, size_t size);
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "cgroup-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "journald-client.h"
|
||||
#include "journald-context.h"
|
||||
#include "log.h"
|
||||
#include "nulstr-util.h"
|
||||
#include "pcre2-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "journald-context.h"
|
||||
#include <stddef.h>
|
||||
|
||||
typedef struct ClientContext ClientContext;
|
||||
|
||||
int client_context_read_log_filter_patterns(ClientContext *c, const char *cgroup);
|
||||
int client_context_check_keep_log(ClientContext *c, const char *message, size_t len);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "journald-server.h"
|
||||
#include <sys/socket.h>
|
||||
|
||||
typedef struct Server Server;
|
||||
|
||||
void server_forward_console(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "journal-util.h"
|
||||
#include "journald-client.h"
|
||||
#include "journald-context.h"
|
||||
#include "journald-server.h"
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
#include "process-util.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <inttypes.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
||||
@@ -11,11 +12,9 @@
|
||||
#include "set.h"
|
||||
#include "time-util.h"
|
||||
|
||||
typedef struct ClientContext ClientContext;
|
||||
typedef struct Server Server;
|
||||
|
||||
#include "journald-server.h"
|
||||
|
||||
struct ClientContext {
|
||||
typedef struct ClientContext {
|
||||
unsigned n_ref;
|
||||
unsigned lru_index;
|
||||
usec_t timestamp;
|
||||
@@ -60,7 +59,7 @@ struct ClientContext {
|
||||
|
||||
Set *log_filter_allowed_patterns;
|
||||
Set *log_filter_denied_patterns;
|
||||
};
|
||||
} ClientContext;
|
||||
|
||||
int client_context_get(
|
||||
Server *s,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "journald-server.h"
|
||||
#include <stddef.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
typedef struct Server Server;
|
||||
|
||||
int server_open_dev_kmsg(Server *s);
|
||||
int server_flush_dev_kmsg(Server *s);
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "journald-server.h"
|
||||
#include <stddef.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
typedef struct Server Server;
|
||||
|
||||
void server_process_native_message(
|
||||
Server *s,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "event-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fdset.h"
|
||||
#include "fileio.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#include "sd-event.h"
|
||||
#include "sd-varlink.h"
|
||||
|
||||
typedef struct Server Server;
|
||||
|
||||
#include "common-signal.h"
|
||||
#include "conf-parser.h"
|
||||
#include "hashmap.h"
|
||||
@@ -68,7 +66,7 @@ typedef struct SeqnumData {
|
||||
uint64_t seqnum;
|
||||
} SeqnumData;
|
||||
|
||||
struct Server {
|
||||
typedef struct Server {
|
||||
char *namespace;
|
||||
|
||||
int syslog_fd;
|
||||
@@ -185,7 +183,7 @@ struct Server {
|
||||
ClientContext *pid1_context; /* the context of PID 1 */
|
||||
|
||||
sd_varlink_server *varlink_server;
|
||||
};
|
||||
} Server;
|
||||
|
||||
#define SERVER_MACHINE_ID(s) ((s)->machine_id_field + STRLEN("_MACHINE_ID="))
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "fd-util.h"
|
||||
#include "iovec-util.h"
|
||||
#include "journald-server.h"
|
||||
#include "journald-socket.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "journald-server.h"
|
||||
#include "socket-util.h"
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "time-util.h"
|
||||
|
||||
typedef struct Server Server;
|
||||
|
||||
int server_forward_socket(Server *s, const struct iovec *iovec, size_t n, const dual_timestamp *ts, int priority);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "errno-util.h"
|
||||
#include "escape.h"
|
||||
#include "fd-util.h"
|
||||
#include "fdset.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
#include "iovec-util.h"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
typedef struct StdoutStream StdoutStream;
|
||||
|
||||
#include "fdset.h"
|
||||
#include "journald-server.h"
|
||||
|
||||
typedef struct Server Server;
|
||||
typedef struct StdoutStream StdoutStream;
|
||||
|
||||
int server_open_stdout_socket(Server *s, const char *stdout_socket);
|
||||
int server_restore_streams(Server *s, FDSet *fds);
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "journald-server.h"
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
typedef struct Server Server;
|
||||
|
||||
int syslog_fixup_facility(int priority) _const_;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "journald-server.h"
|
||||
#include "journald-varlink.h"
|
||||
#include "varlink-io.systemd.Journal.h"
|
||||
#include "varlink-io.systemd.service.h"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "journald-server.h"
|
||||
typedef struct Server Server;
|
||||
|
||||
int server_open_varlink(Server *s, const char *socket, int fd);
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "journald-server.h"
|
||||
typedef struct Server Server;
|
||||
|
||||
void server_forward_wall(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred);
|
||||
|
||||
Reference in New Issue
Block a user