Re: How do I choose an arbitrary minor number for my tty device?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Cox
Date: Tuesday, November 23, 2010 - 6:56 am

> > You can - provide the required method in your console driver and it'll

Your console driver provides a device method (see kernel/printk.c).
When /dev/console is opened the kernel iterates the console list looking
for one with ->device and then calls that method. On success it expects
the passed int * to contain the minor number to use.

I suspect in your case you probably want to attach the primary byte
channel to minor 0 in the driver (and reserve it for that), or some
similar rule.


Sort of - processing gets done but you can disable the processing easily
enough. If you have channels that are not tty related you may want to tap
them directly to avoid the overhead of the tty layer if they are high
data rate.

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

Messages in current thread:
Re: How do I choose an arbitrary minor number for my tty d ..., Alan Cox, (Tue Nov 23, 6:56 am)
Re: How do I choose an arbitrary minor number for my tty d ..., Tabi Timur-B04825, (Mon Nov 29, 9:15 pm)