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

Commit 94608860 authored by Joe Hattori's avatar Joe Hattori
Browse files

bootstat: Remove boot_complete metrics of past boot

When the `sys.boot_completed=1 && sys.bootstat.first_boot_completed=0`
are met, `RecordBootComplete()` runs. This function adds a metric file
for boot_complete, ota_boot_complete, or factory_reset_boot_complete
depending on the boot type. A bug occurs when the system reboots with a
different type, as it reports metrics from the previous, unrelated boot.
This CL makes sure that any metric files from other boot types are
removed when a new boot is recorded.

Test: `bootstat --record_boot_complete -p` reports only one kind of
boot_complete
Bug: 427910639

Change-Id: I55448183cfc1a0eb5da5b2fa1aa49ac97a72e82c
parent 496e1de6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment