Re: [PATCH, RFC, BAD IDEA] /proc/tty/console

From: Randy Dunlap
Date: Wed Feb 27 2008 - 13:58:38 EST


On Wed, 27 Feb 2008 13:52:25 -0500 Bill Nottingham wrote:

> Randy Dunlap (randy.dunlap@xxxxxxxxxx) said:
> > > I'm not seriously proposing this. But, as far as I can tell, this
> > > information isn't exposed to userspace anywhere, and it's a useful
> > > thing to know. I'm certainly open for better ideas on how to expose
> > > this (sysfs attributes? other?)
> > >
> > > ....
> > >
> > > The attached patch adds /proc/tty/console. The contents of it are
> > > simply a description of the current drivers attached to /dev/console.
> > > For example, a boot with 'console=ttyS3,115200n1 console=tty0' would
> > > yield:
> > >
> > > # cat /proc/tty/console
> > > unknown /dev/tty0
> > > serial /dev/ttyS3
> > >
> >
> > So it omits other consoles (non-tty) intentionally?
> > or does it include them even though the procfs filename contains "tty"?
>
> It only does consoles that have a tty_driver, as those are the ones I'd
> find most interesting.
>
> > Anyway, I'd like to see something like this.
> > Compare http://www.xenotime.net/linux/patches/consoles-list.patch
> > (April-2006).
>
> Reading that, unless I'm missing something, you'd lose the device name
> distinction (i.e., *which* serial port).

I don't recall about that, but it would be Bad if correct.
I meant to list *all* consoles. I'm interested in netconsole,
console=lp0, console=ttyUSB0, etc., as well as serial port consoles.

Thanks.
---
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/