mirror of
https://github.com/schoebel/mars
synced 2024-12-19 13:20:20 +00:00
lib_log: report invalid crc check flags
This commit is contained in:
parent
38c77848b9
commit
cc1196fdfc
@ -664,6 +664,8 @@ int _check_crc(struct log_header *lh,
|
||||
int crc_len,
|
||||
__u32 check_flags)
|
||||
{
|
||||
__u32 invalid_check_flags;
|
||||
bool is_invalid = false;
|
||||
int res;
|
||||
|
||||
res = -EBADMSG;
|
||||
@ -691,6 +693,13 @@ int _check_crc(struct log_header *lh,
|
||||
old_crc = *(int*)checksum;
|
||||
if (old_crc == lh->l_crc_old)
|
||||
res = 0;
|
||||
} else {
|
||||
invalid_check_flags = check_flags;
|
||||
is_invalid = true;
|
||||
}
|
||||
if (is_invalid) {
|
||||
MARS_ERR("Found invalid crc flags=0x%x\n",
|
||||
invalid_check_flags);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user