Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kgska-0000K0-Mu for qemu-devel@nongnu.org; Fri, 19 Sep 2008 23:03:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kgska-0000Jl-Ds for qemu-devel@nongnu.org; Fri, 19 Sep 2008 23:03:12 -0400 Received: from [199.232.76.173] (port=34906 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kgska-0000Jg-29 for qemu-devel@nongnu.org; Fri, 19 Sep 2008 23:03:12 -0400 Received: from savannah.gnu.org ([199.232.41.3]:49649 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KgskZ-0007vI-Su for qemu-devel@nongnu.org; Fri, 19 Sep 2008 23:03:12 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KgskZ-00015b-4y for qemu-devel@nongnu.org; Sat, 20 Sep 2008 03:03:11 +0000 Received: from balrog by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KgskY-00015S-JZ for qemu-devel@nongnu.org; Sat, 20 Sep 2008 03:03:10 +0000 MIME-Version: 1.0 Errors-To: balrog Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Andrzej Zaborowski Message-Id: Date: Sat, 20 Sep 2008 03:03:10 +0000 Subject: [Qemu-devel] [5271] Add MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov). Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5271 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5271 Author: balrog Date: 2008-09-20 03:03:09 +0000 (Sat, 20 Sep 2008) Log Message: ----------- Add MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov). Signed-off-by: Kirill A. Shutemov Modified Paths: -------------- trunk/linux-user/ioctls.h trunk/linux-user/syscall.c trunk/linux-user/syscall_defs.h trunk/linux-user/syscall_types.h Modified: trunk/linux-user/ioctls.h =================================================================== --- trunk/linux-user/ioctls.h 2008-09-20 02:29:38 UTC (rev 5270) +++ trunk/linux-user/ioctls.h 2008-09-20 03:03:09 UTC (rev 5271) @@ -310,3 +310,7 @@ IOCTL(LOOP_GET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64))) #endif IOCTL(LOOP_CHANGE_FD, 0, TYPE_INT) + + IOCTL(MTIOCTOP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_mtop))) + IOCTL(MTIOCGET, IOC_R, MK_PTR(MK_STRUCT(STRUCT_mtget))) + IOCTL(MTIOCPOS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_mtpos))) Modified: trunk/linux-user/syscall.c =================================================================== --- trunk/linux-user/syscall.c 2008-09-20 02:29:38 UTC (rev 5270) +++ trunk/linux-user/syscall.c 2008-09-20 03:03:09 UTC (rev 5271) @@ -70,6 +70,7 @@ #include #include #include +#include #include "linux_loop.h" #include "qemu.h" Modified: trunk/linux-user/syscall_defs.h =================================================================== --- trunk/linux-user/syscall_defs.h 2008-09-20 02:29:38 UTC (rev 5270) +++ trunk/linux-user/syscall_defs.h 2008-09-20 03:03:09 UTC (rev 5271) @@ -1923,6 +1923,10 @@ #define TARGET_VFAT_IOCTL_READDIR_BOTH TARGET_IORU('r', 1) #define TARGET_VFAT_IOCTL_READDIR_SHORT TARGET_IORU('r', 2) +#define TARGET_MTIOCTOP TARGET_IOW('m', 1, struct mtop) +#define TARGET_MTIOCGET TARGET_IOR('m', 2, struct mtget) +#define TARGET_MTIOCPOS TARGET_IOR('m', 3, struct mtpos) + struct target_sysinfo { abi_long uptime; /* Seconds since boot */ abi_ulong loads[3]; /* 1, 5, and 15 minute load averages */ Modified: trunk/linux-user/syscall_types.h =================================================================== --- trunk/linux-user/syscall_types.h 2008-09-20 02:29:38 UTC (rev 5270) +++ trunk/linux-user/syscall_types.h 2008-09-20 03:03:09 UTC (rev 5271) @@ -108,3 +108,9 @@ MK_ARRAY(TYPE_CHAR, 64), /* lo_crypt_name */ MK_ARRAY(TYPE_CHAR, 32), /* lo_encrypt_key */ MK_ARRAY(TYPE_ULONGLONG, 2)) /* lo_init */ + +/* mag tape ioctls */ +STRUCT(mtop, TYPE_SHORT, TYPE_INT) +STRUCT(mtget, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG, + TYPE_INT, TYPE_INT) +STRUCT(mtpos, TYPE_LONG)