diff --git a/kernel/lib_log.h b/kernel/lib_log.h index d1dbb5b4..f9e220db 100644 --- a/kernel/lib_log.h +++ b/kernel/lib_log.h @@ -183,9 +183,11 @@ int log_scan(void *buf, int len, loff_t file_pos, int file_offset, bool sloppy, DATA_GET(buf, offset, lh->l_written.tv_sec); DATA_GET(buf, offset, lh->l_written.tv_nsec); - if (unlikely(lh->l_seq_nr != *seq_nr + 1 && lh->l_seq_nr && *seq_nr)) { + if (unlikely(lh->l_seq_nr > *seq_nr + 1 && lh->l_seq_nr && *seq_nr)) { MARS_ERR(SCAN_TXT "record sequence number %u mismatch, expected was %u\n", SCAN_PAR, lh->l_seq_nr, *seq_nr + 1); return -EBADMSG; + } else if (unlikely(lh->l_seq_nr != *seq_nr + 1 && lh->l_seq_nr && *seq_nr)) { + MARS_WRN(SCAN_TXT "record sequence number %u mismatch, expected was %u\n", SCAN_PAR, lh->l_seq_nr, *seq_nr + 1); } *seq_nr = lh->l_seq_nr;