* /dev/vcs or /dev/tty local colormap retrieving
@ 2009-02-27 14:28 Cedric Roux
2009-02-27 15:26 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Cedric Roux @ 2009-02-27 14:28 UTC (permalink / raw)
To: linux-kernel
Hi linux kernel hackers,
I have a problem.
I want to retrieve the current colormap of a given tty.
/dev/vcsX (or /dev/vcsaX) don't dump the colormap
of the given tty through their read() interface.
The GIO_CMAP ioctl call only returns the current *default*
colormap, which is not what I want, since someone may
send terminal commands to modify the colormap of a
specific tty.
(I am working with EGA/VGA text virtual terminals,
source code in drivers/char/vt.c)
I will do my own private hack to dump the colormap,
but maybe it might be useful for other people as
well, so I send you an email to know if you
are interested.
If yes, what is the prefered way (according to
your internal design policy) to do that?
I think about several methods:
1 - dump the 48 bytes of the colormap at the
end of read(/dev/vcsaX), so after the screen
content. Obviously, userland programs that
don't take into account the dimensions of
the console may behave strangely after this
modification, but it's the simplest IMHO,
2 - create a new /dev/vcspX device. Some minor
number after 191 are still available for
major 7 c mode. It would pollute /dev,
but why not,
3 - have a new ioctl, preferably on /dev/vcsaX
or /dev/vcsX, but might also be available
for /dev/ttyX (/dev/vcsaX seems more
natural, because this device already exports
attributes of characters).
We might also want a write access, why not?
And maybe also get the cursor shape (I didn't
check for that because I don't need it, so it
might already be done somewhere).
If you think this feature is useful, I will
send a patch in a few days.
So, well, that's it.
If it appears that I didn't read the sources
carefully enough and if the feature I want
is already there, I apologize. In which case,
please direct me to the correct source file.
Take care and happy hacking,
Cédric.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: /dev/vcs or /dev/tty local colormap retrieving
2009-02-27 14:28 /dev/vcs or /dev/tty local colormap retrieving Cedric Roux
@ 2009-02-27 15:26 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2009-02-27 15:26 UTC (permalink / raw)
To: Cedric Roux; +Cc: linux-kernel
> 3 - have a new ioctl, preferably on /dev/vcsaX
> or /dev/vcsX, but might also be available
> for /dev/ttyX (/dev/vcsaX seems more
> natural, because this device already exports
> attributes of characters).
This is probably the right approach.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-27 15:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-27 14:28 /dev/vcs or /dev/tty local colormap retrieving Cedric Roux
2009-02-27 15:26 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®