On Tue, 16 Nov 2010 16:46:40 +0100
Kay Sievers <kay.sievers@vrfy.org> wrote:
This is all somewhat weird.
All the other vt interface code is in the vt driver, the ioctls for it
are in the vt driver and a query about what is the active vt only has
meaning within that context as you need to post a waitevent first to
track changes during the query. So if you need a VT_GETACTIVE interface
put it in the tty ioctls where it can be properly locked and used.
NAK this, its a nonsense interface
Seriously what use is an interface that tells you "what the console might
have been", this is why we have a proper event tracking interface instead.
This makes more sense.
Please keep unneccessary reformatting patches out of code changes, submit
them separately.
What is the locking on tty0dev at this point ? Wrong place anyway - we
have vt change notifiers that do this properly and can track other
changes like console sizes, add and remove. See the VT_WAITACTIVE stuff
etc.
How do you ensure fg_console returned to user space is right when the
console can change during and after the call ?
--