]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal-file: refactor journal_file_rotate()
authorLennart Poettering <lennart@poettering.net>
Thu, 25 Oct 2018 16:33:11 +0000 (18:33 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 25 Oct 2018 19:43:09 +0000 (21:43 +0200)
commit7a4d21ad20fd8314b2ad31e66d220023e29b2283
tree2527c1ba29f07bd7414a284835fd273159a275f5
parentf760d8a858ca4462ce92d5aab3de78af8b62b058
journal-file: refactor journal_file_rotate()

Let's split the function in three: the part where we archive the old
file into journal_file_archive(), and the part where we initiate the
deferred closing into journal_file_initiate_close().
journal_file_rotate() then simply becomes a wrapper around these two
calls, and the opening of the new journal file.

This useful so that we can archive journal files without having to open
new ones, i.e. to do only the archival part of the rotation, without the
rotation part.
src/journal/journal-file.c
src/journal/journal-file.h