fix(core/prodtest): fix trace and error message in prodtest_pm_charge_disable
What changed, and why it matters
This commit fixes two incorrect text strings in a production-test command. The function that disables battery charging was printing messages saying it was 'enabling' charging. There is no change to actual device behavior, only to the trace and error messages shown during factory testing.
No security action needed. This is a cosmetic/log-message fix in a production-test tool.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In prodtest_power_manager.c, the prodtest_pm_charge_disable() CLI command had copy-paste errors in its user-facing strings: cli_trace() said ‘Enabling battery charging’ and cli_error() said ‘Failed to enable battery charging’. The patch corrects both to ‘Disabling’ and ‘Failed to disable’. The underlying pm_charging_disable() call and error handling are unchanged.
Changed components
core/embed/projects/prodtest/cmd/prodtest_power_manager.cInspect captured patch +2 / −2
diff --git a/core/embed/projects/prodtest/cmd/prodtest_power_manager.c b/core/embed/projects/prodtest/cmd/prodtest_power_manager.c
index da7426a1..a21e127b 100644
--- a/core/embed/projects/prodtest/cmd/prodtest_power_manager.c
+++ b/core/embed/projects/prodtest/cmd/prodtest_power_manager.c
@@ -118,12 +118,12 @@ void prodtest_pm_charge_disable(cli_t* cli) {
return;
}
- cli_trace(cli, "Enabling battery charging");
+ cli_trace(cli, "Disabling battery charging");
pm_status_t status = pm_charging_disable();
if (status != PM_OK) {
cli_error(cli, PRODTEST_ERR_PM_CHARGE_DISABLE,
- "Failed to enable battery charging");
+ "Failed to disable battery charging");
return;
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.