Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 385c2c93 authored by Tom Cherry's avatar Tom Cherry
Browse files

logd: refactor mLast setting into a GetOldest function

This code was duplicated throughout LogBuffer.cpp, so refactor it into
a single location and clean up some comments along the way.

This may fix a subtle bug: if `logcat -c` is used from a
non-privileged UID, the current code may set mLast to the oldest seen
log message *from that UID* and not not the oldest log message for
that log id.  That may prevent pruning from the start of that log,
resulting in old log entries that are impossible to delete.

Bug: 144382260
Test: logging works, and above scenario is not seen
Change-Id: I1749293ce6ea1697dd8a9258cfd7eab29dbeac6e
parent 2e3af867
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment