Skip to contentSkip to conversation

Add termios2 support to ppc target

PATCH New Luca Bonissi 1 participant 1 message Aug 30, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 5/7 Add termios2 support to ppc target

From db847c6abfd73f8d17462cd9358d6ec8dba1c473 Mon Sep 17 00:00:00 2001
From: Luca Bonissi <[email protected]>
Date: Sat, 30 Aug 2025 14:52:32 +0200
Subject: [PATCH 5/7] Add termios2 support to ppc target

---
 linux-user/ppc/termbits.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
linux-user/ppc/termbits.h +24 -0
index eb226e0999..ae6ee8897c 100644
@@ -20,6 +20,28 @@ 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 */
+    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 */
+    target_speed_t c_ispeed;               /* input speed */
+    target_speed_t c_ospeed;               /* output speed */
+};
+
 /* c_cc character offsets */
 #define TARGET_VINTR 	0
 #define TARGET_VQUIT 	1
@@ -225,6 +247,8 @@ 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_TIOCGRS485	0x542e
+#define TARGET_TIOCSRS485	0x542f
 #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 */
Signature · 1 line
2.50.1