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 /include/linux | |
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 'include/linux')
-rw-r--r-- | include/linux/compat_ioctl.h | 1 | ||||
-rw-r--r-- | include/linux/vt.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 269d000bb2a3..bea0255196c4 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -216,6 +216,7 @@ COMPATIBLE_IOCTL(VT_RESIZE) | |||
216 | COMPATIBLE_IOCTL(VT_RESIZEX) | 216 | COMPATIBLE_IOCTL(VT_RESIZEX) |
217 | COMPATIBLE_IOCTL(VT_LOCKSWITCH) | 217 | COMPATIBLE_IOCTL(VT_LOCKSWITCH) |
218 | COMPATIBLE_IOCTL(VT_UNLOCKSWITCH) | 218 | COMPATIBLE_IOCTL(VT_UNLOCKSWITCH) |
219 | COMPATIBLE_IOCTL(VT_GETHIFONTMASK) | ||
219 | /* Little p (/dev/rtc, /dev/envctrl, etc.) */ | 220 | /* Little p (/dev/rtc, /dev/envctrl, etc.) */ |
220 | COMPATIBLE_IOCTL(RTC_AIE_ON) | 221 | COMPATIBLE_IOCTL(RTC_AIE_ON) |
221 | COMPATIBLE_IOCTL(RTC_AIE_OFF) | 222 | COMPATIBLE_IOCTL(RTC_AIE_OFF) |
diff --git a/include/linux/vt.h b/include/linux/vt.h index 8ab334a48222..ba806e8711be 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
@@ -60,5 +60,6 @@ struct vt_consize { | |||
60 | #define VT_RESIZEX 0x560A /* set kernel's idea of screensize + more */ | 60 | #define VT_RESIZEX 0x560A /* set kernel's idea of screensize + more */ |
61 | #define VT_LOCKSWITCH 0x560B /* disallow vt switching */ | 61 | #define VT_LOCKSWITCH 0x560B /* disallow vt switching */ |
62 | #define VT_UNLOCKSWITCH 0x560C /* allow vt switching */ | 62 | #define VT_UNLOCKSWITCH 0x560C /* allow vt switching */ |
63 | #define VT_GETHIFONTMASK 0x560D /* return hi font mask */ | ||
63 | 64 | ||
64 | #endif /* _LINUX_VT_H */ | 65 | #endif /* _LINUX_VT_H */ |