From bd30fdf213c830002aaf48a0d840c011f739ce8f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 26 Apr 2016 11:37:22 +0200 Subject: 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. --- src/journal/journal-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/journal/journal-file.c') 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)) -- cgit v1.2.3-54-g00ecf