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.
This commit is contained in:
parent
d00f1d57cc
commit
bd30fdf213
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue