From patchwork Tue Dec 24 04:34:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11309055 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DFC47921 for ; Tue, 24 Dec 2019 04:38:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B0936206CB for ; Tue, 24 Dec 2019 04:38:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0936206CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rt-rk.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:36046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbxh-00023H-T3 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Dec 2019 23:38:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34705) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbuJ-00069h-0j for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijbuF-0008CZ-QM for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:54 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:58341 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 1ijbuF-000866-9W for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:51 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 725B71A153B; Tue, 24 Dec 2019 05:34:47 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id 32C611A115D; Tue, 24 Dec 2019 05:34:47 +0100 (CET) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v2 1/6] linux-user: Fix some constants in termbits.h Date: Tue, 24 Dec 2019 05:34:33 +0100 Message-Id: <1577162078-29048-2-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1577162078-29048-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1577162078-29048-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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/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/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/alpha/termbits.h b/linux-user/alpha/termbits.h index a714251..ace19be 100644 --- a/linux-user/alpha/termbits.h +++ b/linux-user/alpha/termbits.h @@ -108,8 +108,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 @@ -165,7 +165,7 @@ struct target_termios { #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) #define TARGET_TIOCGETP TARGET_IOR('t', 8, struct target_sgttyb) @@ -217,8 +217,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 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/termbits.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/mips/termbits.h b/linux-user/mips/termbits.h index 3287cf6..3419a49 100644 --- a/linux-user/mips/termbits.h +++ b/linux-user/mips/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/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..220742e 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 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..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) +/* 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/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/x86_64/termbits.h b/linux-user/x86_64/termbits.h index c8bb599..efd35ae 100644 --- a/linux-user/x86_64/termbits.h +++ b/linux-user/x86_64/termbits.h @@ -102,8 +102,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 +198,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 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 @@ -142,8 +142,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 +217,13 @@ struct target_ktermios { /* from arch/xtensa/include/uapi/asm/ioctls.h */ -#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) #define TARGET_TCGETS 0x5401 #define TARGET_TCSETS 0x5402 @@ -235,28 +235,28 @@ struct target_ktermios { #define TARGET_TCSETAW 0x40127419 /* _IOW('t', 25, struct termio) */ #define TARGET_TCSETAF 0x4012741C /* _IOW('t', 28, struct termio) */ -#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) #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 size */ - -#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 +266,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 -#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_struct)*/ #define TARGET_TIOCSSERIAL 0x403C541F /*_IOW('T', 31, struct serial_struct)*/ -#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 +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) +#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 status 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 input line(s) */ -#define TARGET_TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ +/* 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 */ From patchwork Tue Dec 24 04:34:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11309057 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ED7EF921 for ; Tue, 24 Dec 2019 04:40:21 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE544206CB for ; Tue, 24 Dec 2019 04:40:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE544206CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rt-rk.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:36060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbzZ-0003mK-0r for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Dec 2019 23:40:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34516) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbuH-000688-Mp for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijbuF-0008Bz-L1 for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:53 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:58356 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 1ijbuF-00086J-9c for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:51 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 76C941A1CD0; Tue, 24 Dec 2019 05:34:47 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id 41A191A1181; Tue, 24 Dec 2019 05:34:47 +0100 (CET) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v2 2/6] linux-user: mips: Update syscall numbers to kernel 5.5 rc3 level Date: Tue, 24 Dec 2019 05:34:34 +0100 Message-Id: <1577162078-29048-3-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1577162078-29048-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1577162078-29048-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Aleksandar Markovic Update mips syscall numbers based on Linux kernel tag v5.5-rc3 (commit 46cf053e). Signed-off-by: Aleksandar Markovic --- linux-user/mips/cpu_loop.c | 69 ++++++++++++++++++++++++++++++++++++++++++ linux-user/mips/syscall_nr.h | 45 +++++++++++++++++++++++++++ linux-user/mips64/syscall_nr.h | 13 ++++++++ 3 files changed, 127 insertions(+) diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c index 39915b3..a9db725 100644 --- a/linux-user/mips/cpu_loop.c +++ b/linux-user/mips/cpu_loop.c @@ -390,6 +390,75 @@ static const uint8_t mips_syscall_args[] = { MIPS_SYS(sys_copy_file_range, 6) /* 360 */ MIPS_SYS(sys_preadv2, 6) MIPS_SYS(sys_pwritev2, 6) + MIPS_SYS(sys_pkey_mprotect, 4) + MIPS_SYS(sys_pkey_alloc, 2) + MIPS_SYS(sys_pkey_free, 1) /* 365 */ + MIPS_SYS(sys_statx, 5) + MIPS_SYS(sys_rseq, 4) + MIPS_SYS(sys_io_pgetevents, 6) + 0, + 0, /* 370 */ + 0, + 0, + 0, + 0, + 0, /* 375 */ + 0, + 0, + 0, + 0, + 0, /* 380 */ + 0, + 0, + 0, + 0, + 0, /* 385 */ + 0, + 0, + 0, + 0, + 0, /* 390 */ + 0, + 0, + MIPS_SYS(sys_semget, 3) + MIPS_SYS(sys_semctl, 4) + MIPS_SYS(sys_shmget, 3) /* 395 */ + MIPS_SYS(sys_shmctl, 3) + MIPS_SYS(sys_shmat, 3) + MIPS_SYS(sys_shmdt, 1) + MIPS_SYS(sys_msgget, 2) + MIPS_SYS(sys_msgsnd, 4) /* 400 */ + MIPS_SYS(sys_msgrcv, 5) + MIPS_SYS(sys_msgctl, 3) + MIPS_SYS(sys_timer_gettime64, 2) + MIPS_SYS(sys_timer_settime64, 4) + MIPS_SYS(sys_timerfd_gettime64, 2) /* 410 */ + MIPS_SYS(sys_timerfd_settime64, 4) + MIPS_SYS(sys_utimensat_time64, 4) + MIPS_SYS(sys_pselect6_time64, 6) + MIPS_SYS(sys_ppoll_time64, 5) + 0, /* 415 */ + MIPS_SYS(sys_io_pgetevents_time64, 6) + MIPS_SYS(sys_recvmmsg_time64, 5) + MIPS_SYS(sys_mq_timedsend_time64, 5) + MIPS_SYS(sys_mq_timedreceive_time64, 5) + MIPS_SYS(sys_semtimedop_time64, 4) /* 420 */ + MIPS_SYS(sys_rt_sigtimedwait_time64, 4) + MIPS_SYS(sys_futex_time64, 6) + MIPS_SYS(sys_sched_rr_get_interval_time64, 2) + MIPS_SYS(sys_pidfd_send_signal, 4) + MIPS_SYS(sys_io_uring_setup, 2) /* 425 */ + MIPS_SYS(sys_io_uring_enter, 6) + MIPS_SYS(sys_io_uring_register, 4) + MIPS_SYS(sys_open_tree, 3) + MIPS_SYS(sys_move_mount, 5) + MIPS_SYS(sys_fsopen, 2) /* 430 */ + MIPS_SYS(sys_fsconfig, 5) + MIPS_SYS(sys_fsmount, 3) + MIPS_SYS(sys_fspick, 3) + MIPS_SYS(sys_pidfd_open, 2) + MIPS_SYS(sys_clone3, 2) /* 435 */ + }; # undef MIPS_SYS # endif /* O32 */ diff --git a/linux-user/mips/syscall_nr.h b/linux-user/mips/syscall_nr.h index 7fa7fa5..0be3af1 100644 --- a/linux-user/mips/syscall_nr.h +++ b/linux-user/mips/syscall_nr.h @@ -376,5 +376,50 @@ #define TARGET_NR_statx (TARGET_NR_Linux + 366) #define TARGET_NR_rseq (TARGET_NR_Linux + 367) #define TARGET_NR_io_pgetevents (TARGET_NR_Linux + 368) +/* room for arch specific calls */ +#define TARGET_NR_semget (TARGET_NR_Linux + 393) +#define TARGET_NR_semctl (TARGET_NR_Linux + 394) +#define TARGET_NR_shmget (TARGET_NR_Linux + 395) +#define TARGET_NR_shmctl (TARGET_NR_Linux + 396) +#define TARGET_NR_shmat (TARGET_NR_Linux + 397) +#define TARGET_NR_shmdt (TARGET_NR_Linux + 398) +#define TARGET_NR_msgget (TARGET_NR_Linux + 399) +#define TARGET_NR_msgsnd (TARGET_NR_Linux + 400) +#define TARGET_NR_msgrcv (TARGET_NR_Linux + 401) +#define TARGET_NR_msgctl (TARGET_NR_Linux + 402) +/* 403-423 common for 32-bit archs */ +#define TARGET_NR_clock_gettime64 (TARGET_NR_Linux + 403) +#define TARGET_NR_clock_settime64 (TARGET_NR_Linux + 404) +#define TARGET_NR_clock_adjtime64 (TARGET_NR_Linux + 405) +#define TARGET_NR_clock_getres_time64 (TARGET_NR_Linux + 406) +#define TARGET_NR_clock_nanosleep_time64 (TARGET_NR_Linux + 407) +#define TARGET_NR_timer_gettime64 (TARGET_NR_Linux + 408) +#define TARGET_NR_timer_settime64 (TARGET_NR_Linux + 409) +#define TARGET_NR_timerfd_gettime64 (TARGET_NR_Linux + 410) +#define TARGET_NR_timerfd_settime64 (TARGET_NR_Linux + 411) +#define TARGET_NR_utimensat_time64 (TARGET_NR_Linux + 412) +#define TARGET_NR_pselect6_time64 (TARGET_NR_Linux + 413) +#define TARGET_NR_ppoll_time64 (TARGET_NR_Linux + 414) +#define TARGET_NR_io_pgetevents_time64 (TARGET_NR_Linux + 416) +#define TARGET_NR_recvmmsg_time64 (TARGET_NR_Linux + 417) +#define TARGET_NR_mq_timedsend_time64 (TARGET_NR_Linux + 418) +#define TARGET_NR_mq_timedreceive_time64 (TARGET_NR_Linux + 419) +#define TARGET_NR_semtimedop_time64 (TARGET_NR_Linux + 420) +#define TARGET_NR_rt_sigtimedwait_time64 (TARGET_NR_Linux + 421) +#define TARGET_NR_futex_time64 (TARGET_NR_Linux + 422) +#define TARGET_NR_sched_rr_get_interval_time64 (TARGET_NR_Linux + 423) +/* 424 onwards common for all archs */ +#define TARGET_NR_pidfd_send_signal (TARGET_NR_Linux + 424) +#define TARGET_NR_io_uring_setup (TARGET_NR_Linux + 425) +#define TARGET_NR_io_uring_enter (TARGET_NR_Linux + 426) +#define TARGET_NR_io_uring_register (TARGET_NR_Linux + 427) +#define TARGET_NR_open_tree (TARGET_NR_Linux + 428) +#define TARGET_NR_move_mount (TARGET_NR_Linux + 429) +#define TARGET_NR_fsopen (TARGET_NR_Linux + 430) +#define TARGET_NR_fsconfig (TARGET_NR_Linux + 431) +#define TARGET_NR_fsmount (TARGET_NR_Linux + 432) +#define TARGET_NR_fspick (TARGET_NR_Linux + 433) +#define TARGET_NR_pidfd_open (TARGET_NR_Linux + 434) +#define TARGET_NR_clone3 (TARGET_NR_Linux + 435) #endif diff --git a/linux-user/mips64/syscall_nr.h b/linux-user/mips64/syscall_nr.h index db40f69..c86943a 100644 --- a/linux-user/mips64/syscall_nr.h +++ b/linux-user/mips64/syscall_nr.h @@ -674,6 +674,19 @@ #define TARGET_NR_statx (TARGET_NR_Linux + 326) #define TARGET_NR_rseq (TARGET_NR_Linux + 327) #define TARGET_NR_io_pgetevents (TARGET_NR_Linux + 328) +/* 329 through 423 are reserved to sync up with other architectures */ +#define TARGET_NR_pidfd_send_signal (TARGET_NR_Linux + 424) +#define TARGET_NR_io_uring_setup (TARGET_NR_Linux + 425) +#define TARGET_NR_io_uring_enter (TARGET_NR_Linux + 426) +#define TARGET_NR_io_uring_register (TARGET_NR_Linux + 427) +#define TARGET_NR_open_tree (TARGET_NR_Linux + 428) +#define TARGET_NR_move_mount (TARGET_NR_Linux + 429) +#define TARGET_NR_fsopen (TARGET_NR_Linux + 430) +#define TARGET_NR_fsconfig (TARGET_NR_Linux + 431) +#define TARGET_NR_fsmount (TARGET_NR_Linux + 432) +#define TARGET_NR_fspick (TARGET_NR_Linux + 433) +#define TARGET_NR_pidfd_open (TARGET_NR_Linux + 434) +#define TARGET_NR_clone3 (TARGET_NR_Linux + 435) #endif #endif From patchwork Tue Dec 24 04:34:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11309039 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C229214F6 for ; Tue, 24 Dec 2019 04:36:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A306A206B7 for ; Tue, 24 Dec 2019 04:36:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A306A206B7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rt-rk.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:36026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbvQ-0007oK-FN for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Dec 2019 23:36:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34399) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbuH-00067W-08 for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijbuF-0008CN-Oo for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:52 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:58368 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 1ijbuF-00086P-Gp for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:51 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 8798E1A1158; Tue, 24 Dec 2019 05:34:47 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id 4A0C61A1D39; Tue, 24 Dec 2019 05:34:47 +0100 (CET) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v2 3/6] linux-user: Add support for FS_IOC_VERSION ioctls Date: Tue, 24 Dec 2019 05:34:35 +0100 Message-Id: <1577162078-29048-4-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1577162078-29048-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1577162078-29048-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Aleksandar Markovic A very specific thing for these two ioctls is that their code implies that their third argument is of type 'long', but the kernel uses that argument as if it is of type 'int'. This anomaly is recognized also in commit 6080723 (linux-user: Implement FS_IOC_GETFLAGS and FS_IOC_SETFLAGS ioctls). Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index c6b9d6a..c44f42e 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -138,6 +138,8 @@ IOCTL(FS_IOC_GETFLAGS, IOC_R, MK_PTR(TYPE_INT)) IOCTL(FS_IOC_SETFLAGS, IOC_W, MK_PTR(TYPE_INT)) + IOCTL(FS_IOC_GETVERSION, IOC_R, MK_PTR(TYPE_INT)) + IOCTL(FS_IOC_SETVERSION, IOC_W, MK_PTR(TYPE_INT)) #ifdef CONFIG_USBFS /* USB ioctls */ diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 98c2119..f68a8b6 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -911,12 +911,14 @@ struct target_pollfd { #define TARGET_FICLONE TARGET_IOW(0x94, 9, int) #define TARGET_FICLONERANGE TARGET_IOW(0x94, 13, struct file_clone_range) -/* Note that the ioctl numbers claim type "long" but the actual type - * used by the kernel is "int". +/* + * Note that the ioctl numbers for FS_IOC_ + * claim type "long" but the actual type used by the kernel is "int". */ #define TARGET_FS_IOC_GETFLAGS TARGET_IOR('f', 1, abi_long) #define TARGET_FS_IOC_SETFLAGS TARGET_IOW('f', 2, abi_long) - +#define TARGET_FS_IOC_GETVERSION TARGET_IOR('v', 1, abi_long) +#define TARGET_FS_IOC_SETVERSION TARGET_IOW('v', 2, abi_long) #define TARGET_FS_IOC_FIEMAP TARGET_IOWR('f',11,struct fiemap) /* usb ioctls */ From patchwork Tue Dec 24 04:34:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11309037 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84893921 for ; Tue, 24 Dec 2019 04:36:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6492F206B7 for ; Tue, 24 Dec 2019 04:36:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6492F206B7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rt-rk.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:36024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbvQ-0007nr-1y for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Dec 2019 23:36:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34322) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbuG-00066v-R6 for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijbuF-0008BQ-FG for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:52 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:58381 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 1ijbuF-00086e-8S for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:51 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 931E21A0EE6; Tue, 24 Dec 2019 05:34:47 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id 4FDF21A1D40; Tue, 24 Dec 2019 05:34:47 +0100 (CET) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v2 4/6] linux-user: Add support for FS_IOC32_FLAGS ioctls Date: Tue, 24 Dec 2019 05:34:36 +0100 Message-Id: <1577162078-29048-5-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1577162078-29048-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1577162078-29048-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Aleksandar Markovic These FS_IOC32_FLAGS ioctls are identical to FS_IOC_FLAGS ioctls, but without the anomaly of their number defined as if their third argument is of type long, while it is treated internally in kernel as is of type int. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index c44f42e..4fd6939 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -140,6 +140,8 @@ IOCTL(FS_IOC_SETFLAGS, IOC_W, MK_PTR(TYPE_INT)) IOCTL(FS_IOC_GETVERSION, IOC_R, MK_PTR(TYPE_INT)) IOCTL(FS_IOC_SETVERSION, IOC_W, MK_PTR(TYPE_INT)) + IOCTL(FS_IOC32_GETFLAGS, IOC_R, MK_PTR(TYPE_INT)) + IOCTL(FS_IOC32_SETFLAGS, IOC_W, MK_PTR(TYPE_INT)) #ifdef CONFIG_USBFS /* USB ioctls */ diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index f68a8b6..964b2b4 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -920,6 +920,8 @@ struct target_pollfd { #define TARGET_FS_IOC_GETVERSION TARGET_IOR('v', 1, abi_long) #define TARGET_FS_IOC_SETVERSION TARGET_IOW('v', 2, abi_long) #define TARGET_FS_IOC_FIEMAP TARGET_IOWR('f',11,struct fiemap) +#define TARGET_FS_IOC32_GETFLAGS TARGET_IOR('f', 1, int) +#define TARGET_FS_IOC32_SETFLAGS TARGET_IOW('f', 2, int) /* usb ioctls */ #define TARGET_USBDEVFS_CONTROL TARGET_IOWRU('U', 0) From patchwork Tue Dec 24 04:34:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11309043 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30CA114B7 for ; Tue, 24 Dec 2019 04:38:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 10704206CB for ; Tue, 24 Dec 2019 04:38:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10704206CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rt-rk.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:36042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbxU-0001uc-0r for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Dec 2019 23:38:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34540) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbuH-00068J-Rt for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijbuG-0008Eh-Ot for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:53 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:58900 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 1ijbuG-0008C5-HI for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:52 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 9F9291A1164; Tue, 24 Dec 2019 05:34:47 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id 556D31A1D92; Tue, 24 Dec 2019 05:34:47 +0100 (CET) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v2 5/6] linux-user: Add support for FS_IOC32_VERSION ioctls Date: Tue, 24 Dec 2019 05:34:37 +0100 Message-Id: <1577162078-29048-6-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1577162078-29048-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1577162078-29048-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Aleksandar Markovic These FS_IOC32_VERSION ioctls are identical to FS_IOC_VERSION ioctls, but without the anomaly of their number defined as if their third argument is of type long, while it is treated internally in kernel as is of type int. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 4fd6939..3affd88 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -142,6 +142,8 @@ IOCTL(FS_IOC_SETVERSION, IOC_W, MK_PTR(TYPE_INT)) IOCTL(FS_IOC32_GETFLAGS, IOC_R, MK_PTR(TYPE_INT)) IOCTL(FS_IOC32_SETFLAGS, IOC_W, MK_PTR(TYPE_INT)) + IOCTL(FS_IOC32_GETVERSION, IOC_R, MK_PTR(TYPE_INT)) + IOCTL(FS_IOC32_SETVERSION, IOC_W, MK_PTR(TYPE_INT)) #ifdef CONFIG_USBFS /* USB ioctls */ diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 964b2b4..a73cc3d 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -922,6 +922,8 @@ struct target_pollfd { #define TARGET_FS_IOC_FIEMAP TARGET_IOWR('f',11,struct fiemap) #define TARGET_FS_IOC32_GETFLAGS TARGET_IOR('f', 1, int) #define TARGET_FS_IOC32_SETFLAGS TARGET_IOW('f', 2, int) +#define TARGET_FS_IOC32_GETVERSION TARGET_IOR('v', 1, int) +#define TARGET_FS_IOC32_SETVERSION TARGET_IOW('v', 2, int) /* usb ioctls */ #define TARGET_USBDEVFS_CONTROL TARGET_IOWRU('U', 0) From patchwork Tue Dec 24 04:34:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11309041 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C03A14B7 for ; Tue, 24 Dec 2019 04:36:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E15E3206B7 for ; Tue, 24 Dec 2019 04:36:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E15E3206B7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rt-rk.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:36028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbvQ-0007om-TY for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Dec 2019 23:36:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34530) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijbuH-00068E-Pw for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijbuG-0008Em-Oh for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:53 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:58899 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 1ijbuG-0008C6-Hy for qemu-devel@nongnu.org; Mon, 23 Dec 2019 23:34:52 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 97F461A115D; Tue, 24 Dec 2019 05:34:47 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.14.106]) by mail.rt-rk.com (Postfix) with ESMTPSA id 6005D1A1CFA; Tue, 24 Dec 2019 05:34:47 +0100 (CET) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v2 6/6] linux-user: Add support for FS_IOC_FSXATTR ioctls Date: Tue, 24 Dec 2019 05:34:38 +0100 Message-Id: <1577162078-29048-7-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1577162078-29048-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1577162078-29048-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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Aleksandar Markovic These ioctls were relatively recently introduced, so the "#ifdef" guards are used in this implementation. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 7 +++++++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 3affd88..e1b89a7 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -144,6 +144,13 @@ IOCTL(FS_IOC32_SETFLAGS, IOC_W, MK_PTR(TYPE_INT)) IOCTL(FS_IOC32_GETVERSION, IOC_R, MK_PTR(TYPE_INT)) IOCTL(FS_IOC32_SETVERSION, IOC_W, MK_PTR(TYPE_INT)) +#ifdef FS_IOC_FSGETXATTR + IOCTL(FS_IOC_FSGETXATTR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_fsxattr))) +#endif +#ifdef FS_IOC_FSSETXATTR + IOCTL(FS_IOC_FSSETXATTR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_fsxattr))) +#endif + #ifdef CONFIG_USBFS /* USB ioctls */ diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index a73cc3d..12cd3de 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -924,6 +924,8 @@ struct target_pollfd { #define TARGET_FS_IOC32_SETFLAGS TARGET_IOW('f', 2, int) #define TARGET_FS_IOC32_GETVERSION TARGET_IOR('v', 1, int) #define TARGET_FS_IOC32_SETVERSION TARGET_IOW('v', 2, int) +#define TARGET_FS_IOC_FSGETXATTR TARGET_IOR('X', 31, struct file_clone_range) +#define TARGET_FS_IOC_FSSETXATTR TARGET_IOR('X', 32, struct file_clone_range) /* usb ioctls */ #define TARGET_USBDEVFS_CONTROL TARGET_IOWRU('U', 0)