[mingetty] Fix lengt of escape sequence
Petr Pisar
ppisar at fedoraproject.org
Fri Jun 10 12:45:21 UTC 2011
commit f9a210228a1294fd1b6ac1631361171f953b8ec2
Author: Petr Písař <ppisar at redhat.com>
Date: Fri Jun 10 14:44:47 2011 +0200
Fix lengt of escape sequence
...-Clear-scroll-back-buffer-on-clear-screen.patch | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/mingetty-1.08-Clear-scroll-back-buffer-on-clear-screen.patch b/mingetty-1.08-Clear-scroll-back-buffer-on-clear-screen.patch
index a9e05c6..42f6acf 100644
--- a/mingetty-1.08-Clear-scroll-back-buffer-on-clear-screen.patch
+++ b/mingetty-1.08-Clear-scroll-back-buffer-on-clear-screen.patch
@@ -1,27 +1,28 @@
-From a0d04e0d1ccbde0e080f8586adfb7c0392fdf9d3 Mon Sep 17 00:00:00 2001
+From 1b0a3a3b484148ccf9746722f55fc28327ad2e2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
Date: Fri, 10 Jun 2011 13:46:15 +0200
Subject: [PATCH] Clear scroll-back buffer on clear screen
This is implemented in Linux since 3.0 version.
---
- mingetty.c | 6 ++++--
- 1 files changed, 4 insertions(+), 2 deletions(-)
+ mingetty.c | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/mingetty.c b/mingetty.c
-index 327e630..ead355c 100644
+index 327e630..d2ad0fc 100644
--- a/mingetty.c
+++ b/mingetty.c
-@@ -192,8 +192,10 @@ static void open_tty (void)
+@@ -192,8 +192,11 @@ static void open_tty (void)
/* Write a reset string to the terminal. This is very linux-specific
and should be checked for other systems. */
- if (noclear == 0)
- write (0, "\033c", 2);
+ if (noclear == 0) {
-+ write (0, "\033[3;J", 2); /* Clear scroll buffer, since Linux 3.0 */
++ write (0, "\033[3;J", 5); /* Clear scroll-back buffer,
++ since Linux 3.0 */
+ write (0, "\033c", 2); /* Reset */
-+ }
++ }
sigaction (SIGHUP, &sa_old, NULL);
}
More information about the scm-commits
mailing list