Skip to content

Commit

Permalink
package/finit: backport fix to clear background color from GRUB menu
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Oct 28, 2024
1 parent 56d1964 commit 3e5e89b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 46ffa81f5c88ce95db011369d8bfb802313e4217 Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <[email protected]>
Date: Thu, 17 Oct 2024 14:23:24 +0200
Subject: [PATCH] Only mark rdeps dirty if main service is nohup
Subject: [PATCH 1/2] Only mark rdeps dirty if main service is nohup
Organization: Addiva Elektronik

This patch changes a behavior that's been default since Finit 4.0,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 119e66a7e9c95283918639b51dd03a3d666955f8 Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <[email protected]>
Date: Mon, 28 Oct 2024 10:58:04 +0100
Subject: [PATCH 2/2] Reset color attributes and clear screen when starting up
Organization: Addiva Elektronik

Some boot loaders, like GRUB, leave background color artifacts from
their boot menu. This patch resets the foreground and background
color attributes, and then clears the screen, without clearing the
scrollback buffer.

Signed-off-by: Joachim Wiberg <[email protected]>
---
src/helpers.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/src/helpers.c b/src/helpers.c
index 8768de8..99c4557 100644
--- a/src/helpers.c
+++ b/src/helpers.c
@@ -87,6 +87,9 @@ void console_init(void)
/* Enable line wrap, if disabled previously, e.g., qemu */
dprint(STDOUT_FILENO, "\033[?7h", 5);

+ /* Reset atttributes, background and foreground color */
+ dprint(STDOUT_FILENO, "\033[49m\033[39m\e[2J", 14);
+
log_init();
}

--
2.43.0

0 comments on commit 3e5e89b

Please sign in to comment.