Re: tty: add 'active' sysfs attribute to tty0 and console device

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Cox
Date: Tuesday, November 16, 2010 - 8:57 am

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 ?

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

Messages in current thread:
Re: tty: add 'active' sysfs attribute to tty0 and console ..., Alan Cox, (Tue Nov 16, 8:57 am)
Re: tty: add 'active' sysfs attribute to tty0 and console ..., Lennart Poettering, (Tue Nov 16, 2:36 pm)
Re: tty: add 'active' sysfs attribute to tty0 and console ..., Lennart Poettering, (Tue Nov 16, 2:42 pm)
Re: tty: add 'active' sysfs attribute to tty0 and console ..., Lennart Poettering, (Tue Nov 16, 3:58 pm)
Re: tty: add 'active' sysfs attribute to tty0 and console ..., Lennart Poettering, (Tue Nov 16, 4:10 pm)
Re: tty: add 'active' sysfs attribute to tty0 and console ..., Lennart Poettering, (Tue Nov 16, 4:18 pm)
Re: tty: add 'active' sysfs attribute to tty0 and console ..., Valdis.Kletnieks, (Wed Nov 17, 3:01 pm)
Re: tty: add 'active' sysfs attribute to tty0 and console ..., Lennart Poettering, (Wed Nov 17, 6:48 pm)
Re: tty: add 'active' sysfs attribute to tty0 and console ..., Lennart Poettering, (Wed Nov 17, 7:29 pm)
Re: tty: add 'active' sysfs attribute to tty0 and console ..., Dr. Werner Fink, (Fri Nov 19, 10:07 am)
Re: tty: add 'active' sysfs attribute to tty0 and console ..., Dr. Werner Fink, (Fri Nov 19, 11:41 am)