Introduction of a 'big' ioctl, with more bits (20) reserved for encoding the

size field. The TIOCSFON ioctl size (8192) didn't get encoded properly,
as there weren't enough bits for it (12) in the regular format.

The new format has only one type field, and an extra flag (_IOC_BIG)
turned on. FS checks for this flag and uses the alternative decoding
of the ioctl codes to determine the size when doing grants.

This unbreaks loadfont, although that still uses a phys copy in tty.
This commit is contained in:
Ben Gras
2006-07-25 09:41:40 +00:00
parent 7573c41657
commit 82173212ee
4 changed files with 37 additions and 12 deletions
+2 -1
View File
@@ -22,7 +22,8 @@
#define TIOCSWINSZ _IOW('T', 17, struct winsize)
#define TIOCGPGRP _IOW('T', 18, int)
#define TIOCSPGRP _IOW('T', 19, int)
#define TIOCSFON _IOW('T', 20, u8_t [8192])
#define TIOCSFON_OLD _IOW('T', 20, u8_t [8192])
#define TIOCSFON _IOW_BIG(1, u8_t [8192])
/* Legacy <sgtty.h> */
#define TIOCGETP _IOR('t', 1, struct sgttyb)