]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/journal/journal-file.c
journal: return better error for empty files
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 25 Oct 2015 04:09:44 +0000 (00:09 -0400)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 Nov 2015 23:02:00 +0000 (00:02 +0100)
commitcfb571f30fd415304b2f674f1615dc861058c347
treed85eab08cb284b51708ae1a81e6ca192a4d869c6
parentd8e023aa07029b672fba425e100330ef6343e22d
journal: return better error for empty files

When reading stuff, we should only return EIO when an actual read error
occured, not when we don't like the data for whatever reason.

We already return ENODATA for all other kinds of file truncation, hence
do the same for the most obvious kind, so that callers know what ENODATA
means.
src/journal/journal-file.c