util-linux/util-linux-honor-noclear-when-reprint-issue.patch
Jan Engelhardt 271c52a2ba Accepting request 1067908 from home:pgajdos
- added patches
  agetty: don't ignore --noclear when re-print issue file
  0c0fb46dce.diff
  [bsc#1194322]
  + util-linux-honor-noclear-when-reprint-issue.patch

OBS-URL: https://build.opensuse.org/request/show/1067908
OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=496
2023-03-01 16:51:04 +00:00

25 lines
834 B
Diff

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';