H. Peter Anvin [EMAIL PROTECTED] wrote:
> [EMAIL PROTECTED] wrote:
>> By extension, maybe the tty layer would need another interface to 
>> determine
>> the instance:
>>      instance =  driver->ops->get_instance(driver, inode, other_stuff) using 
>> this we find the tty
>>      tty = driver->ops->something(driver, instance, idx);
>
> This seems more than a bit redundant.  The "instance", IMO, *is* the tty 
> structure; so the interface should be:
>
>       tty = driver->ops->get_tty(driver, inode [, other_stuff?]);


Yes, if we have the tty inode, we don't need the index or instance
parameters.  I was generalizing 

For instance in ptmx_open() we initially have only an index and the
ptmx_inode which is somewhat distinct from the tty's inode.

IOW, we use the ptmx_inode to find the 'instance' and use that
instance to build the tty inode. Of course we don't need ->get_tty()
there.

Can the inode be used to identify the driver too ?  (but inode to driver
mapping is not trivial atm).
_______________________________________________
Containers mailing list
[EMAIL PROTECTED]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to