]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
linux-user: Add termios2 support to alpha target
authorLuca Bonissi <qemu@bonslack.org>
Sat, 3 Jan 2026 15:25:33 +0000 (16:25 +0100)
committerHelge Deller <deller@gmx.de>
Fri, 23 Jan 2026 19:40:15 +0000 (20:40 +0100)
Signed-off-by: Luca Bonissi <qemu@bonslack.org>
Link: https://lore.kernel.org/qemu-devel/02dba951-1bcf-4c74-8a6a-f4f4aa5ce909@bonslack.org
Reviewed-by: Helge Deller <deller@gmx.de>
linux-user/alpha/termbits.h

index 4a4b1e96f21c7f568f0eae3d9429f7042a52d77f..b7be23ea13b6bb47cf6bd182c8522c493fde659d 100644 (file)
@@ -17,6 +17,29 @@ struct target_termios {
        target_speed_t c_ospeed;                /* output speed */
 };
 
+struct target_termios2 {
+       target_tcflag_t c_iflag;                /* input mode flags */
+       target_tcflag_t c_oflag;                /* output mode flags */
+       target_tcflag_t c_cflag;                /* control mode flags */
+       target_tcflag_t c_lflag;                /* local mode flags */
+       target_cc_t c_cc[TARGET_NCCS];          /* control characters */
+       target_cc_t c_line;                     /* line discipline (== c_cc[19]) */
+       target_speed_t c_ispeed;                /* input speed */
+       target_speed_t c_ospeed;                /* output speed */
+};
+
+struct target_ktermios {
+       target_tcflag_t c_iflag;                /* input mode flags */
+       target_tcflag_t c_oflag;                /* output mode flags */
+       target_tcflag_t c_cflag;                /* control mode flags */
+       target_tcflag_t c_lflag;                /* local mode flags */
+       target_cc_t c_cc[TARGET_NCCS];          /* control characters */
+       target_cc_t c_line;                     /* line discipline (== c_cc[19]) */
+       target_speed_t c_ispeed;                /* input speed */
+       target_speed_t c_ospeed;                /* output speed */
+};
+
+
 /* c_cc characters */
 #define TARGET_VEOF 0
 #define TARGET_VEOL 1
@@ -247,6 +270,12 @@ struct target_termios {
 #define TARGET_TIOCSBRK        0x5427  /* BSD compatibility */
 #define TARGET_TIOCCBRK        0x5428  /* BSD compatibility */
 #define TARGET_TIOCGSID        0x5429  /* Return the session ID of FD */
+#define TARGET_TCGETS2         TARGET_IOR('T', 0x2A, struct target_termios2)
+#define TARGET_TCSETS2         TARGET_IOW('T', 0x2B, struct target_termios2)
+#define TARGET_TCSETSW2        TARGET_IOW('T', 0x2C, struct target_termios2)
+#define TARGET_TCSETSF2        TARGET_IOW('T', 0x2D, struct target_termios2)
+#define TARGET_TIOCGRS485      TARGET_IOR('T', 0x2E, struct serial_rs485)
+#define TARGET_TIOCSRS485      TARGET_IOWR('T', 0x2F, struct serial_rs485)
 #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 */