Re: vcsa and big endian

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <linuxconsole-dev@...>
Date: Sunday, December 9, 2007 - 7:00 pm

Samuel Thibault, le Sun 09 Dec 2007 23:50:39 +0100, a écrit :

And the code example should be fixed too:

	   char ch, attrib;

           (void) read(fd, &ch, 1);
           (void) read(fd, &attrib, 1);

should rather be

	   unsigned short s;
	   unsigned char ch, attrib;

	   ...

           (void) read(fd, &s, 2);
	   ch = s & 0xff;
	   attrib = (s >> 8);


The manual page should also mention that when a 512 chars font is
loaded, the 9th bit is in the attrib value, and its position can be
fetched through the VT_GETHIFONTMASK ioctl.

Samuel
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
vcsa and big endian, Samuel Thibault, (Sun Dec 9, 6:43 pm)
Re: vcsa and big endian, Samuel Thibault, (Sun Dec 9, 6:50 pm)
Re: vcsa and big endian, Samuel Thibault, (Sun Dec 9, 7:00 pm)