Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'tty-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty fixes from Greg KH:
"Here are two small tty vt fixes for 7.0-rc7 to resolve some reported
issues with the resize ability of the alt screen buffer. Both of these
have been in linux-next all week with no reported issues"

* tag 'tty-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
vt: resize saved unicode buffer on alt screen exit after resize
vt: discard stale unicode buffer on alt screen exit after resize

+18
+18
drivers/tty/vt/vt.c
··· 1909 1909 dest = ((u16 *)vc->vc_origin) + r * vc->vc_cols; 1910 1910 memcpy(dest, src, 2 * cols); 1911 1911 } 1912 + /* 1913 + * If the console was resized while in the alternate screen, 1914 + * resize the saved unicode buffer to the current dimensions. 1915 + * On allocation failure new_uniscr is NULL, causing the old 1916 + * buffer to be freed and vc_uni_lines to be lazily rebuilt 1917 + * via vc_uniscr_check() when next needed. 1918 + */ 1919 + if (vc->vc_saved_uni_lines && 1920 + (vc->vc_saved_rows != vc->vc_rows || 1921 + vc->vc_saved_cols != vc->vc_cols)) { 1922 + u32 **new_uniscr = vc_uniscr_alloc(vc->vc_cols, vc->vc_rows); 1923 + 1924 + if (new_uniscr) 1925 + vc_uniscr_copy_area(new_uniscr, vc->vc_cols, vc->vc_rows, 1926 + vc->vc_saved_uni_lines, cols, 0, rows); 1927 + vc_uniscr_free(vc->vc_saved_uni_lines); 1928 + vc->vc_saved_uni_lines = new_uniscr; 1929 + } 1912 1930 vc_uniscr_set(vc, vc->vc_saved_uni_lines); 1913 1931 vc->vc_saved_uni_lines = NULL; 1914 1932 restore_cur(vc);