aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/console
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-05-12 17:02:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-13 11:02:26 -0400
commitd850a2fac11e4dd45d1d3d493a5a071b06c58c99 (patch)
tree822cfbf9b6214deecb178c86ba7d688a6c16c0ca /drivers/video/console
parent7fe3915a492503a9199af475a433b50258303806 (diff)
vt/fbcon: fix background color on line feed
Another addendum to commit c9e587abfdec2c2aaa55fab83bcb4972e2f84f9b ("vt: fix background color on line feed"). fbcon still was not doing the right thing (read: continued to do old behavior). fbcon_clear() seems to clear the new line (e.g. where your new prompt appears after doing echo -en "\e[42mfoo\n"), while scr_memsetw clears the previous one only (where "foo" appears). So just temporarily set the video_erase_char to the scrl_erase_char so that fbcon_clear does the right thing. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/console')
-rw-r--r--drivers/video/console/fbcon.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index b9703c17b5e8..5fa8b76673cb 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1853,6 +1853,8 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
1853 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; 1853 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
1854 struct display *p = &fb_display[vc->vc_num]; 1854 struct display *p = &fb_display[vc->vc_num];
1855 int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK; 1855 int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK;
1856 unsigned short saved_ec;
1857 int ret;
1856 1858
1857 if (fbcon_is_inactive(vc, info)) 1859 if (fbcon_is_inactive(vc, info))
1858 return -EINVAL; 1860 return -EINVAL;
@@ -1865,6 +1867,11 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
1865 * whole screen (prevents flicker). 1867 * whole screen (prevents flicker).
1866 */ 1868 */
1867 1869
1870 saved_ec = vc->vc_video_erase_char;
1871 vc->vc_video_erase_char = vc->vc_scrl_erase_char;
1872
1873 ret = 0;
1874
1868 switch (dir) { 1875 switch (dir) {
1869 case SM_UP: 1876 case SM_UP:
1870 if (count > vc->vc_rows) /* Maximum realistic size */ 1877 if (count > vc->vc_rows) /* Maximum realistic size */
@@ -1883,7 +1890,7 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
1883 (b - count)), 1890 (b - count)),
1884 vc->vc_scrl_erase_char, 1891 vc->vc_scrl_erase_char,
1885 vc->vc_size_row * count); 1892 vc->vc_size_row * count);
1886 return 1; 1893 ret = 1;
1887 break; 1894 break;
1888 1895
1889 case SCROLL_WRAP_MOVE: 1896 case SCROLL_WRAP_MOVE:
@@ -1955,7 +1962,8 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
1955 (b - count)), 1962 (b - count)),
1956 vc->vc_scrl_erase_char, 1963 vc->vc_scrl_erase_char,
1957 vc->vc_size_row * count); 1964 vc->vc_size_row * count);
1958 return 1; 1965 ret = 1;
1966 break;
1959 } 1967 }
1960 break; 1968 break;
1961 1969
@@ -1974,7 +1982,7 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
1974 t), 1982 t),
1975 vc->vc_scrl_erase_char, 1983 vc->vc_scrl_erase_char,
1976 vc->vc_size_row * count); 1984 vc->vc_size_row * count);
1977 return 1; 1985 ret = 1;
1978 break; 1986 break;
1979 1987
1980 case SCROLL_WRAP_MOVE: 1988 case SCROLL_WRAP_MOVE:
@@ -2044,10 +2052,13 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
2044 t), 2052 t),
2045 vc->vc_scrl_erase_char, 2053 vc->vc_scrl_erase_char,
2046 vc->vc_size_row * count); 2054 vc->vc_size_row * count);
2047 return 1; 2055 ret = 1;
2056 break;
2048 } 2057 }
2058 break;
2049 } 2059 }
2050 return 0; 2060 vc->vc_video_erase_char = saved_ec;
2061 return ret;
2051} 2062}
2052 2063
2053 2064