lkml.org 
[lkml]   [2010]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How do I choose an arbitrary minor number for my tty device?
On Thu, Nov 18, 2010 at 10:56:43AM -0600, Timur Tabi wrote:
> Greg KH wrote:
> > Why? Again, it doesn't matter, and no other tty driver does it.
> >
> > Actually you do have control over it, if you really want it, but again,
> > don't do that :)
>
> Because the only way to know which byte channel tty you want is via the byte
> channel handle.
>
> Think of the situation where you have two serial ports on the back of your
> computer. One of them is /dev/ttyS0, and the other is /dev/ttyS1. But which
> one is which? The only way to find out is try one and see if it works.

No, you can use the /dev/serial/ links to determine exactly which is
which depending on the pci id, and other unique identifiers (serial
numbers, etc.)

> Now that might be acceptable for serial ports that are fixed physically. But
> byte channels handles are completely arbitrary and easily change with even the
> slightest re-configuration of the partitions under the hypervisor. I need to
> have some way to tell userspace that /dev/ttybc0 is byte channel handle 73.

Then again, just use the /dev/serial/ symlinks that are there for you.

> > Sorry, I can't do code review, or accept code that is not allowed to be
> > sent to the public, as, surprise, I'm public :)
>
> Well, ok. I didn't want to spam the mailing list with something that only you
> asked for, but here it is:

Is this somehow not public code? What just changed in the past 15
minutes?

confused,

greg k-h


\
 
 \ /
  Last update: 2010-11-18 18:23    [W:0.193 / U:1.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site