projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5b6c6e
)
firstboot: reset terminal settings right before asking a question
author
Lennart Poettering
<lennart@poettering.net>
Wed, 22 Nov 2023 12:13:03 +0000
(13:13 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 22 Nov 2023 12:27:53 +0000
(13:27 +0100)
We are about to do interactivity on the terminal, hence let's ensure we
are in the TTY mode we expect to be in.
src/firstboot/firstboot.c
patch
|
blob
|
history
diff --git
a/src/firstboot/firstboot.c
b/src/firstboot/firstboot.c
index
6cf7415
..
f77a5f6
100644
(file)
--- a/
src/firstboot/firstboot.c
+++ b/
src/firstboot/firstboot.c
@@
-131,6
+131,8
@@
static void print_welcome(int rfd) {
pn = os_release_pretty_name(pretty_name, os_name);
ac = isempty(ansi_color) ? "0" : ansi_color;
+ (void) reset_terminal_fd(STDIN_FILENO, /* switch_to_text= */ false);
+
if (colors_enabled())
printf("\nWelcome to your new installation of \x1B[%sm%s\x1B[0m!\n", ac, pn);
else