Keep free_cores=0 as gate on, refuse to rewrite totk.ini after a failed read, drop empty-valued lines on Reset, and add plat_file_set_readonly and plat_file_size

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-10-26 09:23:55 +03:00
1 parent 2dd2a177a4
commit 7b85a2681a
6 files changed
+55 -18

No files matched your search

+2 -1
View File
@@ -266,7 +266,8 @@ static void ap_init(void);
static int cores_enabled(void) {
if (g_cores_on < 0) {
g_cores_on = cfg_get("TOTK_FREE_CORES") ? 0 : 1;
const char *fc = cfg_get("TOTK_FREE_CORES");
g_cores_on = fc && strcmp(fc, "0") ? 0 : 1; // "0" keeps the gate, like unset
diag_init();
ap_init();
}