Hide cursor at boot and shutdown

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2025-12-17 08:19:39 +01:00
1 parent a3d9b6e9b1
commit 248b030a57
2 files changed
+6

No files matched your search

+3
View File
@@ -89,6 +89,9 @@ void console_init(void)
/* Reset attributes, background and foreground color */ /* Reset attributes, background and foreground color */
dprint(STDOUT_FILENO, "\033[49m\033[39m\e[2J", 14); dprint(STDOUT_FILENO, "\033[49m\033[39m\e[2J", 14);
/* Hide cursor while we boot up. */
dprint(STDOUT_FILENO, "\033[?25l", 6);
log_init(); log_init();
} }
+3
View File
@@ -361,6 +361,9 @@ restart:
/* Restore terse mode and run hooks before shutdown */ /* Restore terse mode and run hooks before shutdown */
if (runlevel == 0 || runlevel == 6) { if (runlevel == 0 || runlevel == 6) {
/* Hide cursor, we're going down ... */
dprint(STDOUT_FILENO, "\033[?25l", 14);
api_exit(); api_exit();
log_exit(); log_exit();
plugin_run_hooks(HOOK_SHUTDOWN); plugin_run_hooks(HOOK_SHUTDOWN);