]> git.itanic.dy.fi Git - linux-stable/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)
commit71d4abfab322e827a75304431fe0fad3c805cb80
treea02ae2f771384146ca38f643cb6c560932373e62
parent7d62549a22ee500ea2ad764b9d04b87c6bbcd75f
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