Messages in this thread | | | Date | Sat, 8 Jul 2006 22:27:19 -0700 | From | "Randy.Dunlap" <> | Subject | Re: Opinions on removing /proc/tty? |
| |
On Sun, 9 Jul 2006 01:20:12 -0400 Jon Smirl wrote:
> On 7/9/06, Randy.Dunlap <rdunlap@xenotime.net> wrote: > > On Sat, 8 Jul 2006 01:56:02 -0400 Jon Smirl wrote: > > > > > On 7/8/06, Randy.Dunlap <rdunlap@xenotime.net> wrote: > > > > I don't know how well this is an answer to your question, > > > > but I would like to be able to find a list of registered "consoles," > > > > whether they be serial, usbserial, netconsole, lp, or whatever. > > > > /proc/tty/drivers does that partially. > > > > > > Console is an overloaded word. Do you want to know where it is legal > > > to send system log output to, or do you want to know where you can log > > > in from? There was a thread earlier that talked a little about > > > controlling this. > > > > I have a working definition: > > I want to see a list of drivers that have called register_console(). > > > > > > I have a patch that also does it in /proc/consoles: > > > > http://www.xenotime.net/linux/patches/consoles-list.patch > > > > Is somewhere in /sys the right place to find a list of all consoles? > > > > > > /sys is the right place for this info but a class does not exist for it yet. > > > > I want a list of registered consoles. How would I express that in /sys ? > > You could make the list appear as an attribute in > /sys/class/tty/console. You will need to all a little sysfs code after > the console tty device is created. > > > > > > Your patch isn't printing correctly. It is supposed to write the > > > output to seq_file, not use printk. > > > > Pray tell where does it call printk()? > > > > + for (con = console_drivers; con; con = con->next) > + printk("%d: %-8s %c:%c:%c flags:%s%s%s%s%s\n", > + con->index, con->name, > + con->read ? 'R' : 'x',
Ack, don't know how I missed that.
--- ~Randy - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |