From nobody Tue May 7 16:35:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1579227221; cv=none; d=zohomail.com; s=zohoarc; b=eSlJOHkBNXDQwOLSpcdI6ekFAiENC6Qq4B0He+nnSnI52LnwSTne5nSWPyLOh2dk2Uz8G9M8zYQouvojUrxNkTsGaDbbIy2Z4RAEaQ8xD+NiUgT6zj+0baptkQBbsN6aKET9eq2xc3mXl+df1EO35C8CxIBNmC/55TMFONZogOY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579227221; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=ECOEV5+W57xdIa3iVsJ/IlcHtmOcS+oakbG4No9vg1M=; b=ZkNwCVV0XaIY+nRWbeyqsImyiEscXtdwvdedr0+ugbWbzzfolHJjZvV2eKRyajCCnk+U7Pf18jsXH9o7CndGvNEXaYO60SKN72W2AgC2eshBBWgSEx7RLd4mQjn/AiKpZNAOFwdhaHs3bas54nU2XybJqrPm6mGeXjruZAXxAxA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579227221207205.9307265998233; Thu, 16 Jan 2020 18:13:41 -0800 (PST) Received: from localhost ([::1]:51374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isH8l-00086J-QN for importer@patchew.org; Thu, 16 Jan 2020 21:13:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49072) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isH7R-0006nS-Lp for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isH7Q-0003Ge-4Z for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:17 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:35003 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1isH7P-0003DX-Q9 for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:16 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id DD7571A2110; Fri, 17 Jan 2020 03:12:11 +0100 (CET) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id B6D0E1A20E3; Fri, 17 Jan 2020 03:12:11 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 1/4] linux-user: alpha: Synchronize termbits.h with kernel Date: Fri, 17 Jan 2020 03:11:54 +0100 Message-Id: <1579227117-6310-2-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1579227117-6310-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1579227117-6310-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 89.216.37.149 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic Synchronize all elements of alpha's termbits.h with kernel and make sure that all applicable macros and other definitions are expressed in terms of target, not the host. Signed-off-by: Aleksandar Markovic --- linux-user/alpha/termbits.h | 82 +++++++++++++++++++++++++++++++++++++++++= ---- 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/linux-user/alpha/termbits.h b/linux-user/alpha/termbits.h index a714251..d15f26e 100644 --- a/linux-user/alpha/termbits.h +++ b/linux-user/alpha/termbits.h @@ -17,6 +17,32 @@ struct target_termios { target_speed_t c_ospeed; /* output speed */ }; =20 +/* Alpha has identical termios and termios2 */ + +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 (=3D=3D c_cc[19= ]) */ + target_speed_t c_ispeed; /* input speed */ + target_speed_t c_ospeed; /* output speed */ +}; + +/* Alpha has matching termios and ktermios */ + +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 (=3D=3D 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 @@ -88,7 +114,11 @@ struct target_termios { #define TARGET_VTDLY 00200000 #define TARGET_VT0 00000000 #define TARGET_VT1 00200000 -#define TARGET_XTABS 01000000 /* Hmm.. Linux/i386 considers this part of T= ABDLY.. */ +/* + * Should be equivalent to TAB3, see description of TAB3 in + * POSIX.1-2008, Ch. 11.2.3 "Output Modes" + */ +#define TARGET_XTABS TARGET_TAB3 =20 /* c_cflag bit meaning */ #define TARGET_CBAUD 0000037 @@ -108,8 +138,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CBAUDEX 0000000 #define TARGET_B57600 00020 #define TARGET_B115200 00021 @@ -143,6 +173,9 @@ struct target_termios { #define TARGET_CMSPAR 010000000000 /* mark or space (stick) parity */ #define TARGET_CRTSCTS 020000000000 /* flow control */ =20 +#define TARGET_CIBAUD 07600000 +#define TARGET_IBSHIFT 16 + /* c_lflag bits */ #define TARGET_ISIG 0x00000080 #define TARGET_ICANON 0x00000100 @@ -159,13 +192,30 @@ struct target_termios { #define TARGET_FLUSHO 0x00800000 #define TARGET_PENDIN 0x20000000 #define TARGET_IEXTEN 0x00000400 +#define TARGET_EXTPROC 0x10000000 + +/* Values for the ACTION argument to `tcflow'. */ +#define TCOOFF 0 +#define TCOON 1 +#define TCIOFF 2 +#define TCION 3 + +/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ +#define TCIFLUSH 0 +#define TCOFLUSH 1 +#define TCIOFLUSH 2 + +/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ +#define TCSANOW 0 +#define TCSADRAIN 1 +#define TCSAFLUSH 2 =20 #define TARGET_FIOCLEX TARGET_IO('f', 1) #define TARGET_FIONCLEX TARGET_IO('f', 2) #define TARGET_FIOASYNC TARGET_IOW('f', 125, int) #define TARGET_FIONBIO TARGET_IOW('f', 126, int) #define TARGET_FIONREAD TARGET_IOR('f', 127, int) -#define TARGET_TIOCINQ FIONREAD +#define TARGET_TIOCINQ TARGET_FIONREAD #define TARGET_FIOQSIZE TARGET_IOR('f', 128, loff_t) =20 #define TARGET_TIOCGETP TARGET_IOR('t', 8, struct target_sgttyb) @@ -188,6 +238,11 @@ struct target_termios { #define TARGET_TCXONC TARGET_IO('t', 30) #define TARGET_TCFLSH TARGET_IO('t', 31) =20 +#define TARGET_TCGETS2 TARGET_IOR('T', 42, struct target_termios2) +#define TARGET_TCSETS2 TARGET_IOW('T', 43, struct target_termios2) +#define TARGET_TCSETSW2 TARGET_IOW('T', 44, struct target_termios2) +#define TARGET_TCSETSF2 TARGET_IOW('T', 45, struct target_termios2) + #define TARGET_TIOCSWINSZ TARGET_IOW('t', 103, struct target_winsize) #define TARGET_TIOCGWINSZ TARGET_IOR('t', 104, struct target_winsize) #define TARGET_TIOCSTART TARGET_IO('t', 110) /* start output, like ^Q */ @@ -217,8 +272,8 @@ struct target_termios { # define TARGET_TIOCM_CAR 0x040 # define TARGET_TIOCM_RNG 0x080 # define TARGET_TIOCM_DSR 0x100 -# define TARGET_TIOCM_CD TIOCM_CAR -# define TARGET_TIOCM_RI TIOCM_RNG +# define TARGET_TIOCM_CD TARGET_TIOCM_CAR +# define TARGET_TIOCM_RI TARGET_TIOCM_RNG # define TARGET_TIOCM_OUT1 0x2000 # define TARGET_TIOCM_OUT2 0x4000 # define TARGET_TIOCM_LOOP 0x8000 @@ -246,9 +301,24 @@ 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 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 Numb= er (of pty-mux device) */ #define TARGET_TIOCSPTLCK TARGET_IOW('T',0x31, int) /* Lock/unlock Pty */ + /* Get primary device node of /dev/console= */ +#define TARGET_TIOCGDEV TARGET_IOR('T', 0x32, unsigned int) + /* Generate signal on Pty slave */ +#define TARGET_TIOCSIG TARGET_IOW('T', 0x36, int) +#define TARGET_TIOCVHANGUP 0x5437 + /* Get packet mode state */ +#define TARGET_TIOCGPKT TARGET_IOR('T', 0x38, int) + /* Get Pty lock state */ +#define TARGET_TIOCGPTLCK TARGET_IOR('T', 0x39, int) + /* Get exclusive mode state */ +#define TARGET_TIOCGEXCL TARGET_IOR('T', 0x40, int) #define TARGET_TIOCGPTPEER TARGET_IO('T', 0x41) /* Safely open the sl= ave */ +#define TARGET_TIOCGISO7816 TARGET_IOR('T', 0x42, struct serial_iso781= 6) +#define TARGET_TIOCSISO7816 TARGET_IOWR('T', 0x43, struct serial_iso78= 16) =20 #define TARGET_TIOCSERCONFIG 0x5453 #define TARGET_TIOCSERGWILD 0x5454 --=20 2.7.4 From nobody Tue May 7 16:35:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1579227299; cv=none; d=zohomail.com; s=zohoarc; b=OWW1jN4nzCOJdT13mPpu5cWRrsB53cyY+DPfcx5Eeu8Mp86srnODbEBnZvnzNw+a31j4batx8anRg2EamZa1bIP5VtQvobBn6KKZMrOlBP1anoan+UbyDQf6Qlqyckt61MCzOmWOhKELAeUz1MbYOQrt+XQF2JDiQs6KFBwx4Wc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579227299; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=M1I2EuqUej3QLJKCSHLZEJB0x8isZrnQm88LADzdVWM=; b=N7MPfoaRfcajHLdaQYr4ULLdV5Fm+IAE1+m3G31Hqtpv5PrBT4dafscK/jcd5LdMqjT8v4r8aoM4MY0YkraaCsG/TYSPOQMQlWf3Nw8/6uOxofX6cXv/k3C/p2j9yg9Flh1Ze/IxSFRtiM4exh4A1KFzBE/0kaClHzVLyw4Iuwc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579227299392281.85926962845963; Thu, 16 Jan 2020 18:14:59 -0800 (PST) Received: from localhost ([::1]:51398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isHA1-0002Ec-QE for importer@patchew.org; Thu, 16 Jan 2020 21:14:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49075) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isH7R-0006nT-Nu for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isH7Q-0003Gn-5a for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:17 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:35004 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1isH7P-0003Dc-QC for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:16 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id F42171A2012; Fri, 17 Jan 2020 03:12:11 +0100 (CET) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id BF44F1A20EE; Fri, 17 Jan 2020 03:12:11 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 2/4] linux-user: mips: Synchronize termbits.h with kernel Date: Fri, 17 Jan 2020 03:11:55 +0100 Message-Id: <1579227117-6310-3-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1579227117-6310-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1579227117-6310-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 89.216.37.149 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic Synchronize all elements of mips' termbits.h with kernel and make sure that all applicable macros and other definitions are expressed in terms of target, not the host. Signed-off-by: Aleksandar Markovic --- linux-user/mips/termbits.h | 140 ++++++++++++++++++++++++++++-------------= ---- 1 file changed, 89 insertions(+), 51 deletions(-) diff --git a/linux-user/mips/termbits.h b/linux-user/mips/termbits.h index 3287cf6..79a9b9b 100644 --- a/linux-user/mips/termbits.h +++ b/linux-user/mips/termbits.h @@ -3,33 +3,89 @@ #ifndef LINUX_USER_MIPS_TERMBITS_H #define LINUX_USER_MIPS_TERMBITS_H =20 -#define TARGET_NCCS 23 +typedef unsigned char target_cc_t; +typedef unsigned int target_speed_t; +typedef unsigned int target_tcflag_t; =20 +/* + * The ABI says nothing about NCC but seems to use NCCS as + * replacement for it in struct termio + */ +#define TARGET_NCCS 23 struct target_termios { - unsigned int c_iflag; /* input mode flags */ - unsigned int c_oflag; /* output mode flags */ - unsigned int c_cflag; /* control mode flags */ - unsigned int c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[TARGET_NCCS]; /* control characters = */ + 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_line; /* line discipline */ + target_cc_t c_cc[TARGET_NCCS]; /* control characters */ +}; + +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_line; /* line discipline */ + target_cc_t c_cc[TARGET_NCCS]; /* control characters */ + 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_line; /* line discipline */ + target_cc_t c_cc[TARGET_NCCS]; /* control characters */ + target_speed_t c_ispeed; /* input speed */ + target_speed_t c_ospeed; /* output speed */ }; =20 +/* c_cc character offsets */ +#define TARGET_VINTR 0 /* Interrupt character [ISIG]. */ +#define TARGET_VQUIT 1 /* Quit character [ISIG]. */ +#define TARGET_VERASE 2 /* Erase character [ICANON]. */ +#define TARGET_VKILL 3 /* Kill-line character [ICANON]. */ +#define TARGET_VMIN 4 /* Minimum number of bytes read at once */ +#define TARGET_VTIME 5 /* Time-out value (tenths of a second) */ +#define TARGET_VEOL2 6 /* Second EOL character [ICANON]. */ +#define TARGET_VSWTC 7 /* ??? */ +#define TARGET_VSWTCH VSWTC +#define TARGET_VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. = */ +#define TARGET_VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. = */ +#define TARGET_VSUSP 10 /* Suspend character [ISIG]. */ + +#if 0 +/* + * VDSUSP is not supported + */ +#define TARGET_VDSUSP 11 /* Delayed suspend character [ISIG]. */ +#endif +#define TARGET_VREPRINT 12 /* Reprint-line character [ICANON]. */ +#define TARGET_VDISCARD 13 /* Discard character [IEXTEN]. */ +#define TARGET_VWERASE 14 /* Word-erase character [ICANON]. */ +#define TARGET_VLNEXT 15 /* Literal-next character [IEXTEN]. */ +#define TARGET_VEOF 16 /* End-of-file character [ICANON]. */ +#define TARGET_VEOL 17 /* End-of-line character [ICANON]. */ + /* c_iflag bits */ -#define TARGET_IGNBRK 0000001 -#define TARGET_BRKINT 0000002 -#define TARGET_IGNPAR 0000004 -#define TARGET_PARMRK 0000010 -#define TARGET_INPCK 0000020 -#define TARGET_ISTRIP 0000040 -#define TARGET_INLCR 0000100 -#define TARGET_IGNCR 0000200 -#define TARGET_ICRNL 0000400 -#define TARGET_IUCLC 0001000 -#define TARGET_IXON 0002000 -#define TARGET_IXANY 0004000 -#define TARGET_IXOFF 0010000 -#define TARGET_IMAXBEL 0020000 -#define TARGET_IUTF8 0040000 +#define TARGET_IGNBRK 0000001 /* Ignore break condition. */ +#define TARGET_BRKINT 0000002 /* Signal interrupt on break. */ +#define TARGET_IGNPAR 0000004 /* Ignore characters with parity errors. = */ +#define TARGET_PARMRK 0000010 /* Mark parity and framing errors. */ +#define TARGET_INPCK 0000020 /* Enable input parity check. */ +#define TARGET_ISTRIP 0000040 /* Strip 8th bit off characters. */ +#define TARGET_INLCR 0000100 /* Map NL to CR on input. */ +#define TARGET_IGNCR 0000200 /* Ignore CR. */ +#define TARGET_ICRNL 0000400 /* Map CR to NL on input. */ +#define TARGET_IUCLC 0001000 /* Map upper case to lower case on input. = */ +#define TARGET_IXON 0002000 /* Enable start/stop output control. */ +#define TARGET_IXANY 0004000 /* Any character will restart after stop. = */ +#define TARGET_IXOFF 0010000 /* Enable start/stop input control. */ +#define TARGET_IMAXBEL 0020000 /* Ring bell when input queue is full. */ +#define TARGET_IUTF8 0040000 /* Input is UTF-8 */ =20 /* c_oflag bits */ #define TARGET_OPOST 0000001 @@ -82,8 +138,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 @@ -134,26 +190,6 @@ struct target_termios { #define TARGET_TOSTOP 0100000 #define TARGET_ITOSTOP TARGET_TOSTOP =20 -/* c_cc character offsets */ -#define TARGET_VINTR 0 -#define TARGET_VQUIT 1 -#define TARGET_VERASE 2 -#define TARGET_VKILL 3 -#define TARGET_VMIN 4 -#define TARGET_VTIME 5 -#define TARGET_VEOL2 6 -#define TARGET_VSWTC 7 -#define TARGET_VSTART 8 -#define TARGET_VSTOP 9 -#define TARGET_VSUSP 10 -/* VDSUSP not supported */ -#define TARGET_VREPRINT 12 -#define TARGET_VDISCARD 13 -#define TARGET_VWERASE 14 -#define TARGET_VLNEXT 15 -#define TARGET_VEOF 16 -#define TARGET_VEOL 17 - /* ioctls */ =20 #define TARGET_TCGETA 0x5401 @@ -186,7 +222,7 @@ struct target_termios { #define TARGET_TIOCPKT_START 0x08 /* start output */ #define TARGET_TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ #define TARGET_TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ -/* #define TIOCPKT_IOCTL 0x40 state change of pty driver */ +#define TARGET_TIOCPKT_IOCTL 0x40 /* state change of pty driver = */ #define TARGET_TIOCSWINSZ TARGET_IOW('t', 103, struct winsize) /* set wind= ow size */ #define TARGET_TIOCGWINSZ TARGET_IOR('t', 104, struct winsize) /* get wind= ow size */ #define TARGET_TIOCNOTTY 0x5471 /* void tty association */ @@ -205,8 +241,8 @@ struct target_termios { #define TARGET_TIOCGPGRP TARGET_IOR('t', 119, int) /* get pgrp of tty */ #define TARGET_TIOCCONS TARGET_IOW('t', 120, int) /* become virtual consol= e */ =20 -#define TARGET_FIONREAD 0x467f -#define TARGET_TIOCINQ TARGET_FIONREAD +#define TARGET_FIONREAD 0x467f +#define TARGET_TIOCINQ TARGET_FIONREAD =20 #define TARGET_TIOCGETP 0x7408 #define TARGET_TIOCSETP 0x7409 @@ -222,10 +258,10 @@ struct target_termios { #define TARGET_TIOCSBRK 0x5427 /* BSD compatibility */ #define TARGET_TIOCCBRK 0x5428 /* BSD compatibility */ #define TARGET_TIOCGSID 0x7416 /* Return the session ID of FD */ -#define TARGET_TCGETS2 TARGET_IOR('T', 0x2A, struct termios2) -#define TARGET_TCSETS2 TARGET_IOW('T', 0x2B, struct termios2) -#define TARGET_TCSETSW2 TARGET_IOW('T', 0x2C, struct termios2) -#define TARGET_TCSETSF2 TARGET_IOW('T', 0x2D, struct termios2) +#define TARGET_TCGETS2 TARGET_IOR('T', 0x2A, struct target_termio= s2) +#define TARGET_TCSETS2 TARGET_IOW('T', 0x2B, struct target_termio= s2) +#define TARGET_TCSETSW2 TARGET_IOW('T', 0x2C, struct target_termio= s2) +#define TARGET_TCSETSF2 TARGET_IOW('T', 0x2D, struct target_termio= s2) #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 Numb= er (of pty-mux device) */ @@ -237,6 +273,8 @@ struct target_termios { #define TARGET_TIOCGPTLCK TARGET_IOR('T', 0x39, int) #define TARGET_TIOCGEXCL TARGET_IOR('T', 0x40, int) #define TARGET_TIOCGPTPEER TARGET_IO('T', 0x41) +#define TARGET_TIOCGISO7816 TARGET_IOR('T', 0x42, struct serial_iso781= 6) +#define TARGET_TIOCSISO7816 TARGET_IOWR('T', 0x43, struct serial_iso78= 16) =20 /* I hope the range from 0x5480 on is free ... */ #define TARGET_TIOCSCTTY 0x5480 /* become controlling tty */ --=20 2.7.4 From nobody Tue May 7 16:35:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1579227223; cv=none; d=zohomail.com; s=zohoarc; b=YRcuxkEQABYuzzM7sGg6GU7/emcpgHZqxeMJBHOtLiqbPB7tlVOnm5UynGDMSAepRqu9ZbEH9zYrM3GMaxCmpzr07pcmggK1tcqTf+mD1/FCtIsO9FaAGl/I9s3lu1u7Iz6zQWY+/yUhT05ORz2tsbJR78fb+WvJDQDAcmPovHw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579227223; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=LH0xqIMBlQ7hhxbASw0YchaJq5Vn2z+f3hcozcT9szc=; b=mr9NVwoNoXrGseSQc8HIgkkpXTpK0yA9a+l8V6uKmevxMUPAulgSLmqrNTv0EEdSdU0oeEZrgLTPTGJV3p7uH1pIQ9PP7/wkFXGhnG77ZQMQgGpQO7ccFo045hPQeRdYqBfdiOBCRSc9Y6SNbDBeVuK7OgGjpiBEFHi5/XGehHg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579227223613508.52770620391027; Thu, 16 Jan 2020 18:13:43 -0800 (PST) Received: from localhost ([::1]:51376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isH8o-00088u-4H for importer@patchew.org; Thu, 16 Jan 2020 21:13:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49082) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isH7S-0006nV-4i for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isH7Q-0003Gm-5W for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:18 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:35010 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1isH7P-0003Dm-QD for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:16 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 269031A207E; Fri, 17 Jan 2020 03:12:12 +0100 (CET) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id CB1F91A210F; Fri, 17 Jan 2020 03:12:11 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 3/4] linux-user: xtensa: Fix some constants in termbits.h Date: Fri, 17 Jan 2020 03:11:56 +0100 Message-Id: <1579227117-6310-4-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1579227117-6310-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1579227117-6310-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 89.216.37.149 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic Some constants were defined in terms of host, instead of target, as they should be. Some additional trivial changes in this patch were forced by checkpatch.pl. Reviewed-by: Max Filippov Signed-off-by: Aleksandar Markovic --- linux-user/xtensa/termbits.h | 207 +++++++++++++++++++++++----------------= ---- 1 file changed, 113 insertions(+), 94 deletions(-) diff --git a/linux-user/xtensa/termbits.h b/linux-user/xtensa/termbits.h index d1e09e6..abc8666 100644 --- a/linux-user/xtensa/termbits.h +++ b/linux-user/xtensa/termbits.h @@ -15,40 +15,41 @@ =20 #include =20 -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; +typedef unsigned char target_cc_t; +typedef unsigned int target_speed_t; +typedef unsigned int target_tcflag_t; =20 #define TARGET_NCCS 19 + struct target_termios { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[TARGET_NCCS]; /* control characters */ + 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_line; /* line discipline */ + target_cc_t c_cc[TARGET_NCCS]; /* control characters */ }; =20 struct target_termios2 { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[TARGET_NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ + 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_line; /* line discipline */ + target_cc_t c_cc[TARGET_NCCS]; /* control characters */ + target_speed_t c_ispeed; /* input speed */ + target_speed_t c_ospeed; /* output speed */ }; =20 struct target_ktermios { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[TARGET_NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ + 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_line; /* line discipline */ + target_cc_t c_cc[TARGET_NCCS]; /* control characters */ + target_speed_t c_ispeed; /* input speed */ + target_speed_t c_ospeed; /* output speed */ }; =20 /* c_cc characters */ @@ -142,8 +143,8 @@ struct target_ktermios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 @@ -217,13 +218,13 @@ struct target_ktermios { =20 /* from arch/xtensa/include/uapi/asm/ioctls.h */ =20 -#define TARGET_FIOCLEX _IO('f', 1) -#define TARGET_FIONCLEX _IO('f', 2) -#define TARGET_FIOASYNC _IOW('f', 125, int) -#define TARGET_FIONBIO _IOW('f', 126, int) -#define TARGET_FIONREAD _IOR('f', 127, int) -#define TARGET_TIOCINQ FIONREAD -#define TARGET_FIOQSIZE _IOR('f', 128, loff_t) +#define TARGET_FIOCLEX TARGET_IO('f', 1) +#define TARGET_FIONCLEX TARGET_IO('f', 2) +#define TARGET_FIOASYNC TARGET_IOW('f', 125, int) +#define TARGET_FIONBIO TARGET_IOW('f', 126, int) +#define TARGET_FIONREAD TARGET_IOR('f', 127, int) +#define TARGET_TIOCINQ TARGET_FIONREAD +#define TARGET_FIOQSIZE TARGET_IOR('f', 128, loff_t) =20 #define TARGET_TCGETS 0x5401 #define TARGET_TCSETS 0x5402 @@ -235,28 +236,28 @@ struct target_ktermios { #define TARGET_TCSETAW 0x40127419 /* _IOW('t', 25, struct termio) */ #define TARGET_TCSETAF 0x4012741C /* _IOW('t', 28, struct termio) */ =20 -#define TARGET_TCSBRK _IO('t', 29) -#define TARGET_TCXONC _IO('t', 30) -#define TARGET_TCFLSH _IO('t', 31) +#define TARGET_TCSBRK TARGET_IO('t', 29) +#define TARGET_TCXONC TARGET_IO('t', 30) +#define TARGET_TCFLSH TARGET_IO('t', 31) =20 #define TARGET_TIOCSWINSZ 0x40087467 /* _IOW('t', 103, struct winsize) */ #define TARGET_TIOCGWINSZ 0x80087468 /* _IOR('t', 104, struct winsize) */ -#define TARGET_TIOCSTART _IO('t', 110) /* start output, like ^Q */ -#define TARGET_TIOCSTOP _IO('t', 111) /* stop output, like ^S */ -#define TARGET_TIOCOUTQ _IOR('t', 115, int) /* output queue siz= e */ - -#define TARGET_TIOCSPGRP _IOW('t', 118, int) -#define TARGET_TIOCGPGRP _IOR('t', 119, int) - -#define TARGET_TIOCEXCL _IO('T', 12) -#define TARGET_TIOCNXCL _IO('T', 13) -#define TARGET_TIOCSCTTY _IO('T', 14) - -#define TARGET_TIOCSTI _IOW('T', 18, char) -#define TARGET_TIOCMGET _IOR('T', 21, unsigned int) -#define TARGET_TIOCMBIS _IOW('T', 22, unsigned int) -#define TARGET_TIOCMBIC _IOW('T', 23, unsigned int) -#define TARGET_TIOCMSET _IOW('T', 24, unsigned int) +#define TARGET_TIOCSTART TARGET_IO('t', 110) /* start output, like= ^Q */ +#define TARGET_TIOCSTOP TARGET_IO('t', 111) /* stop output, like = ^S */ +#define TARGET_TIOCOUTQ TARGET_IOR('t', 115, int) /* output queue size = */ + +#define TARGET_TIOCSPGRP TARGET_IOW('t', 118, int) +#define TARGET_TIOCGPGRP TARGET_IOR('t', 119, int) + +#define TARGET_TIOCEXCL TARGET_IO('T', 12) +#define TARGET_TIOCNXCL TARGET_IO('T', 13) +#define TARGET_TIOCSCTTY TARGET_IO('T', 14) + +#define TARGET_TIOCSTI TARGET_IOW('T', 18, char) +#define TARGET_TIOCMGET TARGET_IOR('T', 21, unsigned int) +#define TARGET_TIOCMBIS TARGET_IOW('T', 22, unsigned int) +#define TARGET_TIOCMBIC TARGET_IOW('T', 23, unsigned int) +#define TARGET_TIOCMSET TARGET_IOW('T', 24, unsigned int) # define TARGET_TIOCM_LE 0x001 # define TARGET_TIOCM_DTR 0x002 # define TARGET_TIOCM_RTS 0x004 @@ -266,16 +267,16 @@ struct target_ktermios { # define TARGET_TIOCM_CAR 0x040 # define TARGET_TIOCM_RNG 0x080 # define TARGET_TIOCM_DSR 0x100 -# define TARGET_TIOCM_CD TIOCM_CAR -# define TARGET_TIOCM_RI TIOCM_RNG +# define TARGET_TIOCM_CD TARGET_TIOCM_CAR +# define TARGET_TIOCM_RI TARGET_TIOCM_RNG =20 -#define TARGET_TIOCGSOFTCAR _IOR('T', 25, unsigned int) -#define TARGET_TIOCSSOFTCAR _IOW('T', 26, unsigned int) -#define TARGET_TIOCLINUX _IOW('T', 28, char) -#define TARGET_TIOCCONS _IO('T', 29) +#define TARGET_TIOCGSOFTCAR TARGET_IOR('T', 25, unsigned int) +#define TARGET_TIOCSSOFTCAR TARGET_IOW('T', 26, unsigned int) +#define TARGET_TIOCLINUX TARGET_IOW('T', 28, char) +#define TARGET_TIOCCONS TARGET_IO('T', 29) #define TARGET_TIOCGSERIAL 0x803C541E /*_IOR('T', 30, struct serial_struc= t)*/ #define TARGET_TIOCSSERIAL 0x403C541F /*_IOW('T', 31, struct serial_struc= t)*/ -#define TARGET_TIOCPKT _IOW('T', 32, int) +#define TARGET_TIOCPKT TARGET_IOW('T', 32, int) # define TARGET_TIOCPKT_DATA 0 # define TARGET_TIOCPKT_FLUSHREAD 1 # define TARGET_TIOCPKT_FLUSHWRITE 2 @@ -286,43 +287,61 @@ struct target_ktermios { # define TARGET_TIOCPKT_IOCTL 64 =20 =20 -#define TARGET_TIOCNOTTY _IO('T', 34) -#define TARGET_TIOCSETD _IOW('T', 35, int) -#define TARGET_TIOCGETD _IOR('T', 36, int) -#define TARGET_TCSBRKP _IOW('T', 37, int) /* Needed for POSIX tcsend= break()*/ -#define TARGET_TIOCSBRK _IO('T', 39) /* BSD compatibility */ -#define TARGET_TIOCCBRK _IO('T', 40) /* BSD compatibility */ -#define TARGET_TIOCGSID _IOR('T', 41, pid_t) /* Return the session ID o= f FD*/ -#define TARGET_TCGETS2 _IOR('T', 42, struct termios2) -#define TARGET_TCSETS2 _IOW('T', 43, struct termios2) -#define TARGET_TCSETSW2 _IOW('T', 44, struct termios2) -#define TARGET_TCSETSF2 _IOW('T', 45, struct termios2) -#define TARGET_TIOCGRS485 _IOR('T', 46, struct serial_rs485) -#define TARGET_TIOCSRS485 _IOWR('T', 47, struct serial_rs485) -#define TARGET_TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number = (of pty-mux device) */ -#define TARGET_TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ -#define TARGET_TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary dev= ice node of /dev/console */ -#define TARGET_TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty = slave */ -#define TARGET_TIOCVHANGUP _IO('T', 0x37) -#define TARGET_TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ -#define TARGET_TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ -#define TARGET_TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode stat= e */ -#define TARGET_TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ - -#define TARGET_TIOCSERCONFIG _IO('T', 83) -#define TARGET_TIOCSERGWILD _IOR('T', 84, int) -#define TARGET_TIOCSERSWILD _IOW('T', 85, int) +#define TARGET_TIOCNOTTY TARGET_IO('T', 34) +#define TARGET_TIOCSETD TARGET_IOW('T', 35, int) +#define TARGET_TIOCGETD TARGET_IOR('T', 36, int) +/* Needed for POSIX tcsendbreak()*/ +#define TARGET_TCSBRKP TARGET_IOW('T', 37, int) +/* BSD compatibility */ +#define TARGET_TIOCSBRK TARGET_IO('T', 39) +/* BSD compatibility */ +#define TARGET_TIOCCBRK TARGET_IO('T', 40) +/* Return the session ID of FD*/ +#define TARGET_TIOCGSID TARGET_IOR('T', 41, pid_t) +#define TARGET_TCGETS2 TARGET_IOR('T', 42, struct target_termios2) +#define TARGET_TCSETS2 TARGET_IOW('T', 43, struct target_termios2) +#define TARGET_TCSETSW2 TARGET_IOW('T', 44, struct target_termios2) +#define TARGET_TCSETSF2 TARGET_IOW('T', 45, struct target_termios2) +#define TARGET_TIOCGRS485 TARGET_IOR('T', 46, struct serial_rs485) +#define TARGET_TIOCSRS485 TARGET_IOWR('T', 47, struct serial_rs485) +/* Get Pty Number (of pty-mux device) */ +#define TARGET_TIOCGPTN TARGET_IOR('T', 0x30, unsigned int) +/* Lock/unlock Pty */ +#define TARGET_TIOCSPTLCK TARGET_IOW('T', 0x31, int) +/* Get primary device node of /dev/console */ +#define TARGET_TIOCGDEV TARGET_IOR('T', 0x32, unsigned int) +/* Generate signal on Pty slave */ +#define TARGET_TIOCSIG TARGET_IOW('T', 0x36, int) +#define TARGET_TIOCVHANGUP TARGET_IO('T', 0x37) +/* Get packet mode state */ +#define TARGET_TIOCGPKT TARGET_IOR('T', 0x38, int) +/* Get Pty lock state */ +#define TARGET_TIOCGPTLCK TARGET_IOR('T', 0x39, int) +/* Get exclusive mode state */ +#define TARGET_TIOCGEXCL TARGET_IOR('T', 0x40, int) +/* Safely open the slave */ +#define TARGET_TIOCGPTPEER TARGET_IO('T', 0x41) + +#define TARGET_TIOCSERCONFIG TARGET_IO('T', 83) +#define TARGET_TIOCSERGWILD TARGET_IOR('T', 84, int) +#define TARGET_TIOCSERSWILD TARGET_IOW('T', 85, int) #define TARGET_TIOCGLCKTRMIOS 0x5456 #define TARGET_TIOCSLCKTRMIOS 0x5457 -#define TARGET_TIOCSERGSTRUCT 0x5458 /* For debugging only */ -#define TARGET_TIOCSERGETLSR _IOR('T', 89, unsigned int) /* Get line sta= tus reg. */ +/* For debugging only */ +#define TARGET_TIOCSERGSTRUCT 0x5458 +/* Get line status reg. */ +#define TARGET_TIOCSERGETLSR TARGET_IOR('T', 89, unsigned int) /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -# define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically = empty */ -#define TARGET_TIOCSERGETMULTI 0x80a8545a /* Get multiport config */ +/* Transmitter physically empty */ +# define TARGET_TIOCSER_TEMT 0x01 +/* Get multiport config */ +#define TARGET_TIOCSERGETMULTI 0x80a8545a /* _IOR('T', 90, struct serial_multiport_struct) */ -#define TARGET_TIOCSERSETMULTI 0x40a8545b /* Set multiport config */ +/* Set multiport config */ +#define TARGET_TIOCSERSETMULTI 0x40a8545b /* _IOW('T', 91, struct serial_multiport_struct) */ - -#define TARGET_TIOCMIWAIT _IO('T', 92) /* wait for a change on serial inp= ut line(s) */ -#define TARGET_TIOCGICOUNT 0x545D /* read serial port inline interrupt co= unts */ +/* wait for a change on serial input line(s) */ +#define TARGET_TIOCMIWAIT TARGET_IO('T', 92) +/* read serial port inline interrupt counts */ +#define TARGET_TIOCGICOUNT 0x545D #endif /* XTENSA_TERMBITS_H */ --=20 2.7.4 From nobody Tue May 7 16:35:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1579227401; cv=none; d=zohomail.com; s=zohoarc; b=eeg5XcN+BmViM24Z8saaIBRlUkSp/BOsMauReQRAGbamazIAjnqceuxhjB8WtWbM0WfNPIEOesFCOkfTKPbgYxkQK5jgkC6kxTH+heJPbSWFijgG6ijEvuxjxhbuVmwAkmU2Q2v7p+BAGpyRqchRw1wxDDjVBDO3vZMi9wXDvbQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579227401; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=RGG4OUVWUNX0VPz1H0smlMLmmj9tI72IiSTpJZ6r7x0=; b=j44SlHuRgDSG2AnEmqV/cPfomCr1pmTWzdG68GHIEmlA8Oa84GpC/LcRA7iW80sMwxxpcyEff3GXtLm880PapJkxooWrQrT7x1GNC76vW9TuFOVjhxvL8zVFgx+13kqZjmxfk3cHw2QNZubMNrmp5UGdAS2vdmJqWKK45SB0S4o= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579227401508697.8491966393269; Thu, 16 Jan 2020 18:16:41 -0800 (PST) Received: from localhost ([::1]:51436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isHBg-0003bv-6f for importer@patchew.org; Thu, 16 Jan 2020 21:16:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49091) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isH7S-0006nZ-Ly for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isH7Q-0003H7-8a for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:18 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:35007 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1isH7P-0003Dl-QP for qemu-devel@nongnu.org; Thu, 16 Jan 2020 21:12:16 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 1AC301A2047; Fri, 17 Jan 2020 03:12:12 +0100 (CET) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id D30A91A207E; Fri, 17 Jan 2020 03:12:11 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 4/4] linux-user: Fix some constants in remaining termbits.h Date: Fri, 17 Jan 2020 03:11:57 +0100 Message-Id: <1579227117-6310-5-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1579227117-6310-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1579227117-6310-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 89.216.37.149 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic Some constants were defined in terms of host, instead of target, as they should be. Signed-off-by: Aleksandar Markovic --- linux-user/aarch64/termbits.h | 4 ++-- linux-user/arm/termbits.h | 4 ++-- linux-user/cris/termbits.h | 4 ++-- linux-user/hppa/termbits.h | 4 ++-- linux-user/i386/termbits.h | 4 ++-- linux-user/m68k/termbits.h | 4 ++-- linux-user/microblaze/termbits.h | 4 ++-- linux-user/nios2/termbits.h | 4 ++-- linux-user/openrisc/termbits.h | 14 +++++++------- linux-user/ppc/termbits.h | 4 ++-- linux-user/riscv/termbits.h | 4 ++-- linux-user/s390x/termbits.h | 26 +++++++++++++++----------- linux-user/sh4/termbits.h | 4 ++-- linux-user/sparc/termbits.h | 4 ++-- linux-user/sparc64/termbits.h | 4 ++-- linux-user/tilegx/termbits.h | 12 ++++++++---- linux-user/x86_64/termbits.h | 26 +++++++++++++++++++------- 17 files changed, 75 insertions(+), 55 deletions(-) diff --git a/linux-user/aarch64/termbits.h b/linux-user/aarch64/termbits.h index 0ab448d..998fc1d 100644 --- a/linux-user/aarch64/termbits.h +++ b/linux-user/aarch64/termbits.h @@ -83,8 +83,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 diff --git a/linux-user/arm/termbits.h b/linux-user/arm/termbits.h index e555cff..7170b8a 100644 --- a/linux-user/arm/termbits.h +++ b/linux-user/arm/termbits.h @@ -83,8 +83,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 diff --git a/linux-user/cris/termbits.h b/linux-user/cris/termbits.h index 475ee70..76d5ed0 100644 --- a/linux-user/cris/termbits.h +++ b/linux-user/cris/termbits.h @@ -81,8 +81,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 diff --git a/linux-user/hppa/termbits.h b/linux-user/hppa/termbits.h index 8fba839..3094710 100644 --- a/linux-user/hppa/termbits.h +++ b/linux-user/hppa/termbits.h @@ -82,8 +82,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 diff --git a/linux-user/i386/termbits.h b/linux-user/i386/termbits.h index 88264bb..3b16977 100644 --- a/linux-user/i386/termbits.h +++ b/linux-user/i386/termbits.h @@ -82,8 +82,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 diff --git a/linux-user/m68k/termbits.h b/linux-user/m68k/termbits.h index 23840aa..f3ae025 100644 --- a/linux-user/m68k/termbits.h +++ b/linux-user/m68k/termbits.h @@ -83,8 +83,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 diff --git a/linux-user/microblaze/termbits.h b/linux-user/microblaze/termb= its.h index 17db8a4..7697736 100644 --- a/linux-user/microblaze/termbits.h +++ b/linux-user/microblaze/termbits.h @@ -81,8 +81,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 diff --git a/linux-user/nios2/termbits.h b/linux-user/nios2/termbits.h index 425a2fe..269ab59 100644 --- a/linux-user/nios2/termbits.h +++ b/linux-user/nios2/termbits.h @@ -83,8 +83,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 diff --git a/linux-user/openrisc/termbits.h b/linux-user/openrisc/termbits.h index 7a635ff..35f7b26 100644 --- a/linux-user/openrisc/termbits.h +++ b/linux-user/openrisc/termbits.h @@ -124,8 +124,8 @@ struct target_termios3 { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 @@ -222,7 +222,7 @@ struct target_termios3 { #define TARGET_TIOCGSOFTCAR 0x5419 #define TARGET_TIOCSSOFTCAR 0x541A #define TARGET_FIONREAD 0x541B -#define TARGET_TIOCINQ FIONREAD +#define TARGET_TIOCINQ TARGET_FIONREAD #define TARGET_TIOCLINUX 0x541C #define TARGET_TIOCCONS 0x541D #define TARGET_TIOCGSERIAL 0x541E @@ -236,10 +236,10 @@ struct target_termios3 { #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 termios2) -#define TARGET_TCSETS2 TARGET_IOW('T', 0x2B, struct termios2) -#define TARGET_TCSETSW2 TARGET_IOW('T', 0x2C, struct termios2) -#define TARGET_TCSETSF2 TARGET_IOW('T', 0x2D, struct termios2) +#define TARGET_TCGETS2 TARGET_IOR('T', 0x2A, struct target_termios= 2) +#define TARGET_TCSETS2 TARGET_IOW('T', 0x2B, struct target_termios= 2) +#define TARGET_TCSETSW2 TARGET_IOW('T', 0x2C, struct target_termios= 2) +#define TARGET_TCSETSF2 TARGET_IOW('T', 0x2D, struct target_termios= 2) #define TARGET_TIOCGRS485 0x542E #ifndef TARGET_TIOCSRS485 #define TARGET_TIOCSRS485 0x542F diff --git a/linux-user/ppc/termbits.h b/linux-user/ppc/termbits.h index 19e4c6e..66bb76c 100644 --- a/linux-user/ppc/termbits.h +++ b/linux-user/ppc/termbits.h @@ -107,8 +107,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CBAUDEX 0000000 #define TARGET_B57600 00020 #define TARGET_B115200 00021 diff --git a/linux-user/riscv/termbits.h b/linux-user/riscv/termbits.h index 5e0af0d..778de0c 100644 --- a/linux-user/riscv/termbits.h +++ b/linux-user/riscv/termbits.h @@ -83,8 +83,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 diff --git a/linux-user/s390x/termbits.h b/linux-user/s390x/termbits.h index 9affa8f..140f684 100644 --- a/linux-user/s390x/termbits.h +++ b/linux-user/s390x/termbits.h @@ -128,8 +128,8 @@ struct target_ktermios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 @@ -234,7 +234,7 @@ struct target_ktermios { #define TARGET_TIOCGSOFTCAR 0x5419 #define TARGET_TIOCSSOFTCAR 0x541A #define TARGET_FIONREAD 0x541B -#define TARGET_TIOCINQ FIONREAD +#define TARGET_TIOCINQ TARGET_FIONREAD #define TARGET_TIOCLINUX 0x541C #define TARGET_TIOCCONS 0x541D #define TARGET_TIOCGSERIAL 0x541E @@ -248,14 +248,18 @@ struct target_ktermios { #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 _IOR('T',0x2A, struct termios2) -#define TARGET_TCSETS2 _IOW('T',0x2B, struct termios2) -#define TARGET_TCSETSW2 _IOW('T',0x2C, struct termios2) -#define TARGET_TCSETSF2 _IOW('T',0x2D, struct termios2) -#define TARGET_TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of= pty-mux device) */ -#define TARGET_TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ -#define TARGET_TIOCGDEV _IOR('T',0x32, unsigned int) /* Get real dev no be= low /dev/console */ -#define TARGET_TIOCGPTPEER TARGET_IO('T', 0x41) /* Safely open the sl= ave */ +#define TARGET_TCGETS2 TARGET_IOR('T', 0x2A, struct target_termio= s2) +#define TARGET_TCSETS2 TARGET_IOW('T', 0x2B, struct target_termio= s2) +#define TARGET_TCSETSW2 TARGET_IOW('T', 0x2C, struct target_termio= s2) +#define TARGET_TCSETSF2 TARGET_IOW('T', 0x2D, struct target_termio= s2) +/* Get Pty Number (of pty-mux device) */ +#define TARGET_TIOCGPTN TARGET_IOR('T', 0x30, unsigned int) +/* Lock/unlock Pty */ +#define TARGET_TIOCSPTLCK TARGET_IOW('T', 0x31, int) +/* Get real dev no below /dev/console */ +#define TARGET_TIOCGDEV TARGET_IOR('T', 0x32, unsigned int) +/* Safely open the slave */ +#define TARGET_TIOCGPTPEER TARGET_IO('T', 0x41) =20 #define TARGET_FIONCLEX 0x5450 /* these numbers need to be adjusted. */ #define TARGET_FIOCLEX 0x5451 diff --git a/linux-user/sh4/termbits.h b/linux-user/sh4/termbits.h index dd125b6..89a124d 100644 --- a/linux-user/sh4/termbits.h +++ b/linux-user/sh4/termbits.h @@ -101,8 +101,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 diff --git a/linux-user/sparc/termbits.h b/linux-user/sparc/termbits.h index f85219e..e38e53e 100644 --- a/linux-user/sparc/termbits.h +++ b/linux-user/sparc/termbits.h @@ -109,8 +109,8 @@ struct target_termios { #define TARGET_B9600 0x0000000d #define TARGET_B19200 0x0000000e #define TARGET_B38400 0x0000000f -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0x00000030 #define TARGET_CS5 0x00000000 #define TARGET_CS6 0x00000010 diff --git a/linux-user/sparc64/termbits.h b/linux-user/sparc64/termbits.h index 11b5abc..c86f714 100644 --- a/linux-user/sparc64/termbits.h +++ b/linux-user/sparc64/termbits.h @@ -109,8 +109,8 @@ struct target_termios { #define TARGET_B9600 0x0000000d #define TARGET_B19200 0x0000000e #define TARGET_B38400 0x0000000f -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0x00000030 #define TARGET_CS5 0x00000000 #define TARGET_CS6 0x00000010 diff --git a/linux-user/tilegx/termbits.h b/linux-user/tilegx/termbits.h index 966daec..75f78d7 100644 --- a/linux-user/tilegx/termbits.h +++ b/linux-user/tilegx/termbits.h @@ -224,10 +224,14 @@ struct target_termios2 { #define TARGET_TIOCSBRK 0x5427 #define TARGET_TIOCCBRK 0x5428 #define TARGET_TIOCGSID 0x5429 -#define TARGET_TCGETS2 TARGET_IOR('T', 0x2A, struct termi= os2) -#define TARGET_TCSETS2 TARGET_IOW('T', 0x2B, struct termi= os2) -#define TARGET_TCSETSW2 TARGET_IOW('T', 0x2C, struct termi= os2) -#define TARGET_TCSETSF2 TARGET_IOW('T', 0x2D, struct termi= os2) +#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 0x542E #define TARGET_TIOCSRS485 0x542F #define TARGET_TIOCGPTN TARGET_IOR('T', 0x30, unsigned int) diff --git a/linux-user/x86_64/termbits.h b/linux-user/x86_64/termbits.h index c8bb599..25d9d5d 100644 --- a/linux-user/x86_64/termbits.h +++ b/linux-user/x86_64/termbits.h @@ -6,6 +6,7 @@ typedef unsigned char target_cc_t; typedef unsigned int target_speed_t; typedef unsigned int target_tcflag_t; + struct target_termios { target_tcflag_t c_iflag; /* input mode flags */ target_tcflag_t c_oflag; /* output mode flags */ @@ -15,6 +16,17 @@ struct target_termios { target_cc_t c_cc[TARGET_NCCS]; /* control characters */ }; =20 +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_line; /* line discipline */ + target_cc_t c_cc[TARGET_NCCS]; /* control characters */ + target_speed_t c_ispeed; /* input speed */ + target_speed_t c_ospeed; /* output speed */ +}; + /* c_cc characters */ #define TARGET_VINTR 0 #define TARGET_VQUIT 1 @@ -102,8 +114,8 @@ struct target_termios { #define TARGET_B9600 0000015 #define TARGET_B19200 0000016 #define TARGET_B38400 0000017 -#define TARGET_EXTA B19200 -#define TARGET_EXTB B38400 +#define TARGET_EXTA TARGET_B19200 +#define TARGET_EXTB TARGET_B38400 #define TARGET_CSIZE 0000060 #define TARGET_CS5 0000000 #define TARGET_CS6 0000020 @@ -198,7 +210,7 @@ struct target_termios { #define TARGET_TIOCGSOFTCAR 0x5419 #define TARGET_TIOCSSOFTCAR 0x541A #define TARGET_FIONREAD 0x541B -#define TARGET_TIOCINQ FIONREAD +#define TARGET_TIOCINQ TARGET_FIONREAD #define TARGET_TIOCLINUX 0x541C #define TARGET_TIOCCONS 0x541D #define TARGET_TIOCGSERIAL 0x541E @@ -212,10 +224,10 @@ 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 termios2) -#define TARGET_TCSETS2 TARGET_IOW('T',0x2B, struct termios2) -#define TARGET_TCSETSW2 TARGET_IOW('T',0x2C, struct termios2) -#define TARGET_TCSETSF2 TARGET_IOW('T',0x2D, struct termios2) +#define TARGET_TCGETS2 TARGET_IOR('T', 0x2A, struct target_termio= s2) +#define TARGET_TCSETS2 TARGET_IOW('T', 0x2B, struct target_termio= s2) +#define TARGET_TCSETSW2 TARGET_IOW('T', 0x2C, struct target_termio= s2) +#define TARGET_TCSETSF2 TARGET_IOW('T', 0x2D, struct target_termio= s2) #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 sl= ave */ --=20 2.7.4