vc_screen: extract vcs_read_buf_header
authorJiri Slaby <jslaby@suse.cz>
Tue, 18 Aug 2020 08:57:05 +0000 (10:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Aug 2020 11:45:22 +0000 (13:45 +0200)
commitb1c32fcfadf5593ab7a63261cc8a5747c36e627e
tree2b1b8c9a33b1cb3c8307ae4aedf2eaf2c6348de6
parent6a6b76cc44c98a39d3e718aa2056e2e12b609615
vc_screen: extract vcs_read_buf_header

The attribute header handling is terrible in vcs_read_buf. Separate it
to a new function and simply do memmove (of up to 4 bytes) to the start
of the con_buf -- if user seeked.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200818085706.12163-15-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vc_screen.c