From d02af6f33b69c1335f338e941c8fafb3c2b1a390 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 2 Feb 2022 14:30:50 +0000 Subject: journal: Rename JournaldFile to ManagedJournalFile JournalFile and JournaldFile are hard to distinguish from each other. Let's use ManagedJournalFile instead to make the distinction more clear. --- src/journal-remote/journal-remote-write.c | 6 +++--- src/journal-remote/journal-remote-write.h | 4 ++-- src/journal-remote/journal-remote.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/journal-remote') diff --git a/src/journal-remote/journal-remote-write.c b/src/journal-remote/journal-remote-write.c index b82cb10118..5e47616504 100644 --- a/src/journal-remote/journal-remote-write.c +++ b/src/journal-remote/journal-remote-write.c @@ -3,8 +3,8 @@ #include "alloc-util.h" #include "journal-remote.h" -static int do_rotate(JournaldFile **f, MMapCache *m, bool compress, bool seal) { - int r = journald_file_rotate(f, m, compress, UINT64_MAX, seal, NULL); +static int do_rotate(ManagedJournalFile **f, MMapCache *m, bool compress, bool seal) { + int r = managed_journal_file_rotate(f, m, compress, UINT64_MAX, seal, NULL); if (r < 0) { if (*f) log_error_errno(r, "Failed to rotate %s: %m", (*f)->file->path); @@ -40,7 +40,7 @@ static Writer* writer_free(Writer *w) { if (w->journal) { log_debug("Closing journal file %s.", w->journal->file->path); - journald_file_close(w->journal); + managed_journal_file_close(w->journal); } if (w->server && w->hashmap_key) diff --git a/src/journal-remote/journal-remote-write.h b/src/journal-remote/journal-remote-write.h index d97f6c674b..ccbea29fbd 100644 --- a/src/journal-remote/journal-remote-write.h +++ b/src/journal-remote/journal-remote-write.h @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "journald-file.h" #include "journal-importer.h" +#include "managed-journal-file.h" typedef struct RemoteServer RemoteServer; typedef struct Writer { - JournaldFile *journal; + ManagedJournalFile *journal; JournalMetrics metrics; MMapCache *mmap; diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index e91b46473b..67a0205bee 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -14,11 +14,11 @@ #include "errno-util.h" #include "escape.h" #include "fd-util.h" -#include "journald-file.h" #include "journal-remote-write.h" #include "journal-remote.h" #include "journald-native.h" #include "macro.h" +#include "managed-journal-file.h" #include "parse-util.h" #include "process-util.h" #include "socket-util.h" @@ -61,7 +61,7 @@ static int open_output(RemoteServer *s, Writer *w, const char* host) { assert_not_reached(); } - r = journald_file_open_reliably(filename, + r = managed_journal_file_open_reliably(filename, O_RDWR|O_CREAT, 0640, s->compress, UINT64_MAX, s->seal, &w->metrics, -- cgit v1.2.1