Linus Torvalds <[email protected]> writes: > What this does is get rid of the horrible notion of having that > > struct inode *ptmx_inode > > be the interface between the pty code and devpts. By de-emphasizing the > ptmx inode, a lot of things actually get cleaner, and we will have a much > saner way forward.
I will take a look in a minute. Before I do that I want to mention why I care about /dev/pts/ptmx. There is a posix function that is widely used called ptsname. It's function is to take a master file descriptor and returns the path to the slave. All we have in the kernel to support ptsname is an ioctl TIOCGPTN that returns the pty number in the appropriate instance of devpts. The only way we have today to query which instance of devpts the pty is on is through fstat and look st_dev to see if the file is on the correct filesystem. This works when /dev/pts/ptmx is used and fails when /dev/ptmx is used. Does anyone else care? If no one cares I will stop worrying about it and just get on with fixing the rest of this mess which there definitely seems to be the will to do. Eric

