]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal-file: port journal_file_open() to openat_report_new() 22808/head
authorLennart Poettering <lennart@poettering.net>
Mon, 21 Mar 2022 17:13:06 +0000 (18:13 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 21 Mar 2022 17:23:44 +0000 (18:23 +0100)
commitdb5e7d75dc5598b5ae9cd3c2e4ae1acba3a7b7ec
treed07b6d723c1d7a475473888c076fcbd0d2a4c1ac
parentd120d897eca011cd782a9e4074d91e25b6d76895
journal-file: port journal_file_open() to openat_report_new()

We so far had some magic logic in place that files we open for write
with size zero are freshly created. That of course is a bogus
assumption, in particular as this code deals with corrupted file systems
which oftentimes contain zero size inodes from left-over runs.

Let's fix this properly, and actually let the kernel tell us whether it
create the file or not.
src/libsystemd/sd-journal/journal-file.c