diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2006-08-27 04:23:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-08-27 14:01:29 -0400 |
commit | 533475d3d48eb839be2b57f6b020150abae91063 (patch) | |
tree | 04145dcb5d7499fb2f8899a42ac0350c6e55203a /drivers/char/vt_ioctl.c | |
parent | b8cf368944807e29b16b24588a2a35c829bc9d9a (diff) |
[PATCH] vcsa attribute bits -> ioctl(VT_GETHIFONTMASK)
When reading /dev/vcsa while a font with more than 256 characters is
loaded, one of the attribute bits records the 9th bit of the character.
But depending on the console driver (vgacon or fbcon for instance), that's
bit 3 or bit 0. And there is no way for userland to know that, thus no way
for userland to safely grab the screen content. So here is a (tested)
patch:
Add a VT_GETHIFONTMASK ioctl for knowing which bit is the 9th bit for VC
text (vc_hi_font_mask field of the vc_data structure).
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/vt_ioctl.c')
-rw-r--r-- | drivers/char/vt_ioctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index eccffaf26faa..a5628a8b6620 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c | |||
@@ -1011,6 +1011,8 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, | |||
1011 | return -EPERM; | 1011 | return -EPERM; |
1012 | vt_dont_switch = 0; | 1012 | vt_dont_switch = 0; |
1013 | return 0; | 1013 | return 0; |
1014 | case VT_GETHIFONTMASK: | ||
1015 | return put_user(vc->vc_hi_font_mask, (unsigned short __user *)arg); | ||
1014 | default: | 1016 | default: |
1015 | return -ENOIOCTLCMD; | 1017 | return -ENOIOCTLCMD; |
1016 | } | 1018 | } |