Skip to content

Commit 702a606

Browse files
committed
Hide cursor at boot and shutdown
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent a3d9b6e commit 702a606

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/helpers.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ void console_init(void)
8989
/* Reset attributes, background and foreground color */
9090
dprint(STDOUT_FILENO, "\033[49m\033[39m\e[2J", 14);
9191

92+
/* Hide cursor while we boot up. */
93+
dprint(STDOUT_FILENO, "\033[?25l", 6);
94+
9295
log_init();
9396
}
9497

src/sm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@ void sm_step(void)
361361

362362
/* Restore terse mode and run hooks before shutdown */
363363
if (runlevel == 0 || runlevel == 6) {
364+
/* Hide cursor, we're going down ... */
365+
dprint(STDOUT_FILENO, "\033[?25l", 14);
366+
364367
api_exit();
365368
log_exit();
366369
plugin_run_hooks(HOOK_SHUTDOWN);

0 commit comments

Comments
 (0)