[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 01/20] linux-user: Fix some constants in termbits.h
From: |
Laurent Vivier |
Subject: |
Re: [PATCH v5 01/20] linux-user: Fix some constants in termbits.h |
Date: |
Tue, 14 Jan 2020 15:16:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 |
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit :
> From: Aleksandar Markovic <address@hidden>
>
> 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 <address@hidden>
> Signed-off-by: Aleksandar Markovic <address@hidden>
> ---
> linux-user/aarch64/termbits.h | 4 +-
> linux-user/alpha/termbits.h | 10 +--
> 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/mips/termbits.h | 4 +-
> linux-user/nios2/termbits.h | 4 +-
> linux-user/openrisc/termbits.h | 6 +-
> 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/x86_64/termbits.h | 6 +-
> linux-user/xtensa/termbits.h | 156
> ++++++++++++++++++++++-----------------
> 19 files changed, 141 insertions(+), 119 deletions(-)
>
...
> diff --git a/linux-user/s390x/termbits.h b/linux-user/s390x/termbits.h
> index 9affa8f..79a71c2 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
> below /dev/console */
> -#define TARGET_TIOCGPTPEER TARGET_IO('T', 0x41) /* Safely open the
> slave */
> +#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)
should be target_termios2
> +/* 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)
>
> #define TARGET_FIONCLEX 0x5450 /* these numbers need to be adjusted. */
> #define TARGET_FIOCLEX 0x5451
...
> diff --git a/linux-user/xtensa/termbits.h b/linux-user/xtensa/termbits.h
> index d1e09e6..d92fe9c 100644
> --- a/linux-user/xtensa/termbits.h
> +++ b/linux-user/xtensa/termbits.h
...
> @@ -286,43 +286,61 @@ struct target_ktermios {
> # define TARGET_TIOCPKT_IOCTL 64
>
>
> -#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
> tcsendbreak()*/
> -#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 of
> 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
> device 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 state
> */
> -#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 termios2)
> +#define TARGET_TCSETS2 TARGET_IOW('T', 43, struct termios2)
> +#define TARGET_TCSETSW2 TARGET_IOW('T', 44, struct termios2)
> +#define TARGET_TCSETSF2 TARGET_IOW('T', 45, struct termios2)
should be target_termios2
Thanks,
Laurent
- [PATCH v5 00/20] linux-user: Misc patches for 5.0, Aleksandar Markovic, 2020/01/13
- [PATCH v5 04/20] linux-user: microblaze: Update syscall numbers to kernel 5.5 rc3 level, Aleksandar Markovic, 2020/01/13
- [PATCH v5 05/20] linux-user: mips: Update syscall numbers to kernel 5.5 rc3 level, Aleksandar Markovic, 2020/01/13
- [PATCH v5 03/20] linux-user: m68k: Update syscall numbers to kernel 5.5 rc3 level, Aleksandar Markovic, 2020/01/13
- [PATCH v5 06/20] linux-user: x86_64: Update syscall numbers to kernel 5.5 rc3 level, Aleksandar Markovic, 2020/01/13
- [PATCH v5 07/20] linux-user: xtensa: Update syscall numbers to kernel 5.5 rc3 level, Aleksandar Markovic, 2020/01/13
- [PATCH v5 01/20] linux-user: Fix some constants in termbits.h, Aleksandar Markovic, 2020/01/13
- Re: [PATCH v5 01/20] linux-user: Fix some constants in termbits.h,
Laurent Vivier <=
- [PATCH v5 02/20] linux-user: alpha: Update syscall numbers to kernel 5.5 rc3 level, Aleksandar Markovic, 2020/01/13
- [PATCH v5 08/20] linux-user: xtensa: Remove unused constant TARGET_NR_syscall_count, Aleksandar Markovic, 2020/01/13
- [PATCH v5 10/20] linux-user: Add support for FS_IOC32_<GET|SET>FLAGS ioctls, Aleksandar Markovic, 2020/01/13
- [PATCH v5 09/20] linux-user: Add support for FS_IOC_<GET|SET>VERSION ioctls, Aleksandar Markovic, 2020/01/13
- [PATCH v5 12/20] linux-user: Add support for FS_IOC_FS<GET|SET>XATTR ioctls, Aleksandar Markovic, 2020/01/13