3
0
forked from pool/util-linux
util-linux/util-linux-honor-noclear-when-reprint-issue.patch

25 lines
834 B
Diff
Raw Normal View History

Index: util-linux-2.38.1/term-utils/agetty.c
===================================================================
--- util-linux-2.38.1.orig/term-utils/agetty.c
+++ util-linux-2.38.1/term-utils/agetty.c
@@ -2066,7 +2066,8 @@ again:
if (!wait_for_term_input(STDIN_FILENO)) {
eval_issue_file(ie, op, tp);
if (issue_is_changed(ie)) {
- if (op->flags & F_VCONSOLE)
+ if ((op->flags & F_VCONSOLE)
+ && (op->flags & F_NOCLEAR) == 0)
termio_clear(STDOUT_FILENO);
goto again;
}
@@ -2207,7 +2208,8 @@ static char *get_logname(struct issue *i
if (!issue_is_changed(ie))
goto no_reload;
tcflush(STDIN_FILENO, TCIFLUSH);
- if (op->flags & F_VCONSOLE)
+ if ((op->flags & F_VCONSOLE)
+ && (op->flags & F_NOCLEAR) == 0)
termio_clear(STDOUT_FILENO);
bp = logname;
*bp = '\0';