Linus Torvalds writes: (Summary) And it's *not* fairly straightforward, because the
tty_operations "ioctl()" function pointer only gets 'struct tty *'.
So in the TIOCGPTPEER path, we don't actually have access to the file
pointer of the fd we're doing the ioctl on.
pointer of the fd we're doing the ioctl on.
And that's where the 'struct path' to the 'ptmx' node is - which we need to then look up the 'pts' directory.
need to then look up the 'pts' directory.
How very annoying. I think that's why we did it all at ptmx_open() time, because then we had all the information.
time, because then we had all the information.
Linus
Linus
Linus
pointer of the fd we're doing the ioctl on.
And that's where the 'struct path' to the 'ptmx' node is - which we need to then look up the 'pts' directory.
need to then look up the 'pts' directory.
How very annoying. I think that's why we did it all at ptmx_open() time, because then we had all the information.
time, because then we had all the information.
Linus
Linus
Linus