diff options
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index c734f9b1263a..281aada7b4a1 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -194,10 +194,11 @@ static DECLARE_WORK(console_work, console_callback); | |||
194 | int fg_console; | 194 | int fg_console; |
195 | int last_console; | 195 | int last_console; |
196 | int want_console = -1; | 196 | int want_console = -1; |
197 | int saved_fg_console; | 197 | static int saved_fg_console; |
198 | int saved_last_console; | 198 | static int saved_last_console; |
199 | int saved_want_console; | 199 | static int saved_want_console; |
200 | int saved_vc_mode; | 200 | static int saved_vc_mode; |
201 | static int saved_console_blanked; | ||
201 | 202 | ||
202 | /* | 203 | /* |
203 | * For each existing display, we have a pointer to console currently visible | 204 | * For each existing display, we have a pointer to console currently visible |
@@ -905,22 +906,16 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, | |||
905 | * bottom of buffer | 906 | * bottom of buffer |
906 | */ | 907 | */ |
907 | old_origin += (old_rows - new_rows) * old_row_size; | 908 | old_origin += (old_rows - new_rows) * old_row_size; |
908 | end = vc->vc_scr_end; | ||
909 | } else { | 909 | } else { |
910 | /* | 910 | /* |
911 | * Cursor is in no man's land, copy 1/2 screenful | 911 | * Cursor is in no man's land, copy 1/2 screenful |
912 | * from the top and bottom of cursor position | 912 | * from the top and bottom of cursor position |
913 | */ | 913 | */ |
914 | old_origin += (vc->vc_y - new_rows/2) * old_row_size; | 914 | old_origin += (vc->vc_y - new_rows/2) * old_row_size; |
915 | end = old_origin + (old_row_size * new_rows); | ||
916 | } | 915 | } |
917 | } else | 916 | } |
918 | /* | 917 | |
919 | * Cursor near the top, copy contents from the top of buffer | 918 | end = old_origin + old_row_size * min(old_rows, new_rows); |
920 | */ | ||
921 | end = (old_rows > new_rows) ? old_origin + | ||
922 | (old_row_size * new_rows) : | ||
923 | vc->vc_scr_end; | ||
924 | 919 | ||
925 | update_attr(vc); | 920 | update_attr(vc); |
926 | 921 | ||
@@ -3074,8 +3069,7 @@ static int bind_con_driver(const struct consw *csw, int first, int last, | |||
3074 | 3069 | ||
3075 | old_was_color = vc->vc_can_do_color; | 3070 | old_was_color = vc->vc_can_do_color; |
3076 | vc->vc_sw->con_deinit(vc); | 3071 | vc->vc_sw->con_deinit(vc); |
3077 | if (!vc->vc_origin) | 3072 | vc->vc_origin = (unsigned long)vc->vc_screenbuf; |
3078 | vc->vc_origin = (unsigned long)vc->vc_screenbuf; | ||
3079 | visual_init(vc, i, 0); | 3073 | visual_init(vc, i, 0); |
3080 | set_origin(vc); | 3074 | set_origin(vc); |
3081 | update_attr(vc); | 3075 | update_attr(vc); |
@@ -3449,6 +3443,7 @@ int con_debug_enter(struct vc_data *vc) | |||
3449 | saved_last_console = last_console; | 3443 | saved_last_console = last_console; |
3450 | saved_want_console = want_console; | 3444 | saved_want_console = want_console; |
3451 | saved_vc_mode = vc->vc_mode; | 3445 | saved_vc_mode = vc->vc_mode; |
3446 | saved_console_blanked = console_blanked; | ||
3452 | vc->vc_mode = KD_TEXT; | 3447 | vc->vc_mode = KD_TEXT; |
3453 | console_blanked = 0; | 3448 | console_blanked = 0; |
3454 | if (vc->vc_sw->con_debug_enter) | 3449 | if (vc->vc_sw->con_debug_enter) |
@@ -3492,6 +3487,7 @@ int con_debug_leave(void) | |||
3492 | fg_console = saved_fg_console; | 3487 | fg_console = saved_fg_console; |
3493 | last_console = saved_last_console; | 3488 | last_console = saved_last_console; |
3494 | want_console = saved_want_console; | 3489 | want_console = saved_want_console; |
3490 | console_blanked = saved_console_blanked; | ||
3495 | vc_cons[fg_console].d->vc_mode = saved_vc_mode; | 3491 | vc_cons[fg_console].d->vc_mode = saved_vc_mode; |
3496 | 3492 | ||
3497 | vc = vc_cons[fg_console].d; | 3493 | vc = vc_cons[fg_console].d; |