All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Greg KH <greg@kroah.com>,
	Lennart Poettering <mzxreary@0pointer.de>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Kay Sievers <kay.sievers@vrfy.org>,
	Valdis.Kletnieks@vt.edu,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Randy Dunlap <rdunlap@xenotime.net>, Jiri Slaby <jslaby@suse.cz>
Subject: Re: tty: add 'active' sysfs attribute to tty0 and console device
Date: Thu, 18 Nov 2010 13:04:15 +0100	[thread overview]
Message-ID: <AANLkTinYa9ujzN4kVGcctEXG37J-a+HEW6jDzLZ5z4v9@mail.gmail.com> (raw)
In-Reply-To: <20101118110020.GA13871@boole.suse.de>

On 2010-11-18, Dr. Werner Fink <werner@suse.de> wrote:
> On Wed, Nov 17, 2010 at 05:53:10PM -0800, Greg KH wrote:
>> On Thu, Nov 18, 2010 at 02:48:48AM +0100, Lennart Poettering wrote:
>> > On Wed, 17.11.10 17:27, Greg KH (greg@kroah.com) wrote:
>> >
>> > > I can do any one, or multiple things from the following options:
>> > >
>> > > 	- disable the existing ioctl to return an error so that no new
>> > > 	  userspace program starts to use it thinking it is valid
>> > > 	- accept Werner's patch for those who like proc files
>> > > 	- accept Kay's patch
>> > >
>> > > Any suggestions?
>> >
>> > Maybe this is not so surprising, but I definitely want item #3 from the
>> > list.
>> >
>> > I am against #2, since #1 is a much nicer solution, and having both
>> > would be needlessly redundant.
>>
>> I think you mean s/1/3/ here, right?
>>
>> And yes, having both will be redundant, and Werner seems to not be
>> responding anymore as to why he feels his patch is somehow still needed
>> given that Kay's patch accomplishes the same thing from what I can tell.
>
> I'm still reading and I'm wondering about this discussion.  The only
> thing I'd like to be able is to detect all ttys used for the system
> console even if not a VT (not having a VT but several other consoles
> is the most pressing case e.g. on s390 or zSeries) and this without
> forcing (and maybe stealing) the controlling tty on the system console
> to be able to detect the primary tty/console.
>
> The primary tty marked with CON_CONSDEV and normally the first in
> console_drivers.  This can be done with Kay's patch as well as with
> my approach.  And both approaches do have the advantage to become
> the full list of consoles which will help me to extend e.g. sulogin ...
>
> The only advantage of my approache in comparision to Kay's one is that
> the remaining console flags become visible for normal user space.
> This was an idea of Randy Dunlap otherwise my patch would provide
> the same information as the patch of Kay.
>
> Maybe Kay could extend his patch in that way that the flags and the
> facilities (having device, read, write, and unblank) are also shown
> in the new file /sys/class/tty/console/active ... but maybe Randy
> could says a few words for what this is usable.

I'm pretty sure such flags, if they are meant to be exported to
userspace (which I have no good idea about) belong to the individual
devices, and not in the 'active' file.

We surely can do that, if that fits into the general picture. You
could poll(console/active) for changes, get the list of devices, and
look at them individually. poll() will tell you when you dynamically
need to adapt your service.

Kay

  parent reply	other threads:[~2010-11-18 12:04 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16 15:46 tty: add 'active' sysfs attribute to tty0 and console device Kay Sievers
2010-11-16 15:57 ` Alan Cox
2010-11-16 16:13   ` Kay Sievers
2010-11-16 17:14     ` Alan Cox
2010-11-16 18:51       ` Kay Sievers
2010-11-16 19:55         ` Alan Cox
2010-11-16 20:15           ` Kay Sievers
2010-11-16 20:49             ` Alan Cox
2010-11-16 21:29               ` Kay Sievers
2010-11-16 21:42               ` Lennart Poettering
2010-11-16 22:51                 ` Alan Cox
2010-11-16 22:58                   ` Lennart Poettering
2010-11-16 23:04                     ` Alan Cox
2010-11-16 23:18                       ` Lennart Poettering
2010-11-16 23:49                         ` Etched Pixels
2010-11-16 21:36           ` Lennart Poettering
2010-11-16 22:56             ` Alan Cox
2010-11-16 23:10               ` Lennart Poettering
2010-11-16 23:45                 ` Alan Cox
2010-11-17 16:31                 ` John Stoffel
2010-11-17 22:01                 ` Valdis.Kletnieks
2010-11-17 23:40                   ` Kay Sievers
2010-11-17 23:56                     ` Alan Cox
2010-11-18  1:27                       ` Greg KH
2010-11-18  1:48                         ` Lennart Poettering
2010-11-18  1:53                           ` Greg KH
2010-11-18  2:29                             ` Lennart Poettering
2010-11-18 11:00                             ` Dr. Werner Fink
2010-11-18 11:23                               ` Alan Cox
2010-11-18 12:12                                 ` Dr. Werner Fink
2010-11-18 12:58                                   ` Alan Cox
2010-11-18 13:14                                     ` Dr. Werner Fink
2010-11-18 14:41                                       ` Alan Cox
2010-11-19 13:21                                         ` Dr. Werner Fink
2010-11-19 15:47                                           ` Alan Cox
2010-11-19 17:07                                             ` Dr. Werner Fink
2010-11-19 18:02                                             ` Greg KH
2010-11-19 18:41                                               ` Dr. Werner Fink
2010-11-20 12:40                                                 ` Alan Cox
2010-12-01 11:15                                                   ` Dr. Werner Fink
2010-11-18 12:04                               ` Kay Sievers [this message]
2010-11-18 10:15                         ` Alan Cox
2010-11-18 11:55                           ` Kay Sievers
2010-11-18 13:01                             ` Alan Cox
     [not found] <20101201112004.12d78cd7@lxorguk.ukuu.org.uk>
2010-12-01 12:32 ` Dr. Werner Fink
     [not found]   ` <tiocgdev1@mdm.bga.com>
2010-12-03 11:48     ` Dr. Werner Fink

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTinYa9ujzN4kVGcctEXG37J-a+HEW6jDzLZ5z4v9@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mzxreary@0pointer.de \
    --cc=rdunlap@xenotime.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.