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:
parent
4e1aefaf3d
commit
e5ee2446a0
@ -1187,9 +1187,15 @@ void printsys(char *msg)
|
|||||||
while (isdigit(*p))
|
while (isdigit(*p))
|
||||||
seqno = 10 * seqno + (*p++ - '0');
|
seqno = 10 * seqno + (*p++ - '0');
|
||||||
|
|
||||||
/* Check if logged already (we've been restarted) */
|
/*
|
||||||
if (sys_seqno > 0 && seqno <= sys_seqno)
|
* Check if logged already (we've been restarted)
|
||||||
return;
|
* 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;
|
sys_seqno = seqno;
|
||||||
|
|
||||||
p++; /* skip ',' */
|
p++; /* skip ',' */
|
||||||
|
Loading…
Reference in New Issue
Block a user