Commit 2b74f621 authored by Andreas Schwab's avatar Andreas Schwab Committed by Laurent Vivier
Browse files

linux-user: Implement ioctl cmd TIOCGPTPEER



With glibc 2.27 the openpty function prefers the TIOCGPTPEER ioctl.

Signed-off-by: default avatarAndreas Schwab <schwab@suse.de>
Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
Message-Id: <mvmbmhdosb9.fsf_-_@suse.de>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent f0fa8176
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -187,6 +187,8 @@ struct target_termios {
        /* Get Pty Number (of pty-mux device) */
#define TARGET_TIOCSPTLCK       TARGET_IOW('T', 0x31, int)
        /* Lock/unlock Pty */
#define TARGET_TIOCGPTPEER      TARGET_IO('T', 0x41)
        /* Safely open the slave */

#define TARGET_FIONCLEX         0x5450  /* these numbers need to be adjusted. */
#define TARGET_FIOCLEX          0x5451
+1 −0
Original line number Diff line number Diff line
@@ -245,6 +245,7 @@ struct target_termios {
#define TARGET_TIOCGSID	0x5429  /* Return the session ID of FD */
#define TARGET_TIOCGPTN	TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TARGET_TIOCSPTLCK	TARGET_IOW('T',0x31, int)  /* Lock/unlock Pty */
#define TARGET_TIOCGPTPEER      TARGET_IO('T', 0x41) /* Safely open the slave */

#define TARGET_TIOCSERCONFIG	0x5453
#define TARGET_TIOCSERGWILD	0x5454
+1 −0
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ struct target_termios {
#define TARGET_TIOCGSID	0x5429  /* Return the session ID of FD */
#define TARGET_TIOCGPTN	TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TARGET_TIOCSPTLCK	TARGET_IOW('T',0x31, int)  /* Lock/unlock Pty */
#define TARGET_TIOCGPTPEER      TARGET_IO('T', 0x41) /* Safely open the slave */

#define TARGET_FIONCLEX	0x5450  /* these numbers need to be adjusted. */
#define TARGET_FIOCLEX		0x5451
+1 −0
Original line number Diff line number Diff line
@@ -182,6 +182,7 @@ struct target_termios {
#define TARGET_TIOCGSID	0x5429  /* Return the session ID of FD */
#define TARGET_TIOCGPTN	TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TARGET_TIOCSPTLCK	TARGET_IOW('T',0x31, int)  /* Lock/unlock Pty */
#define TARGET_TIOCGPTPEER      TARGET_IO('T', 0x41) /* Safely open the slave */

#define TARGET_FIONCLEX	0x5450  /* these numbers need to be adjusted. */
#define TARGET_FIOCLEX		0x5451
+2 −0
Original line number Diff line number Diff line
@@ -186,6 +186,8 @@ struct target_termios {
        /* Get Pty Number (of pty-mux device) */
#define TARGET_TIOCSPTLCK       TARGET_IOW('T', 0x31, int)
        /* Lock/unlock Pty */
#define TARGET_TIOCGPTPEER      TARGET_IO('T', 0x41)
        /* Safely open the slave */

#define TARGET_FIONCLEX         0x5450  /* these numbers need to be adjusted. */
#define TARGET_FIOCLEX          0x5451
Loading