Follow-up to 92a4fb3
: allow kernel log dupes around edge of seqno
Although hihgly unlikely, if the kernel log sequence number (seqno) reaches the end of its MAX value (18446744073709551615) we allow for dupes to handle the wrap-around back to zero (0) in the counter. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@ -1187,9 +1187,15 @@ void printsys(char *msg)
|
||||
while (isdigit(*p))
|
||||
seqno = 10 * seqno + (*p++ - '0');
|
||||
|
||||
/* Check if logged already (we've been restarted) */
|
||||
if (sys_seqno > 0 && seqno <= sys_seqno)
|
||||
return;
|
||||
/*
|
||||
* Check if logged already (we've been restarted)
|
||||
* Account for wrap-around at 18446744073709551615
|
||||
*/
|
||||
if (sys_seqno > 0 && seqno <= sys_seqno) {
|
||||
/* allow dupes around the edge */
|
||||
if (sys_seqno < 18446744073709551000)
|
||||
return;
|
||||
}
|
||||
sys_seqno = seqno;
|
||||
|
||||
p++; /* skip ',' */
|
||||
|
Reference in New Issue
Block a user