summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-26 11:37:22 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-26 12:00:03 +0200
commitbd30fdf213c830002aaf48a0d840c011f739ce8f (patch)
treeba7ee4444bf41cac6db5876d2ec1c4be608cbd25
parentd00f1d57cc326231e7003340056f4fbcf056674c (diff)
journal-file: always generate the same error when encountering corrupted files
Let's make sure EBADMSG is the one error we throw when we encounter corrupted data, so that we can neatly test for it.
-rw-r--r--src/journal/journal-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index c4318636f7..e13ae05990 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -707,7 +707,7 @@ int journal_file_move_to_object(JournalFile *f, ObjectType type, uint64_t offset
/* Objects may only be located at multiple of 64 bit */
if (!VALID64(offset))
- return -EFAULT;
+ return -EBADMSG;
/* Object may not be located in the file header */
if (offset < le64toh(f->header->header_size))