]> git.baikalelectronics.ru Git - kernel.git/commit
vc_screen: rewrite vcs_size to accept vc, not inode
authorJiri Slaby <jslaby@suse.cz>
Tue, 18 Aug 2020 08:56:55 +0000 (10:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Aug 2020 11:45:20 +0000 (13:45 +0200)
commit165a454bc642611c0708c21f126314bb5eaaeb86
treea02ae2f771384146ca38f643cb6c560932373e62
parent8a15d8d8b8c555852db235a2f034667caabf5a7a
vc_screen: rewrite vcs_size to accept vc, not inode

It is weird to fetch the information from the inode over and over. Read
and write already have the needed information, so rewrite vcs_size to
accept a vc, attr and unicode and adapt vcs_lseek to that.

Also make sure all sites check the return value of vcs_size for errors.

And document it using kernel-doc.

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