From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgL5e-0004GO-MZ for qemu-devel@nongnu.org; Thu, 18 Sep 2008 11:06:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgL5b-0004EB-K8 for qemu-devel@nongnu.org; Thu, 18 Sep 2008 11:06:41 -0400 Received: from [199.232.76.173] (port=56927 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgL5b-0004Dr-6n for qemu-devel@nongnu.org; Thu, 18 Sep 2008 11:06:39 -0400 Received: from ey-out-1920.google.com ([74.125.78.148]:7979) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KgL5a-0005aE-JK for qemu-devel@nongnu.org; Thu, 18 Sep 2008 11:06:38 -0400 Received: by ey-out-1920.google.com with SMTP id 4so1516425eyk.4 for ; Thu, 18 Sep 2008 08:06:38 -0700 (PDT) From: "Kirill A. Shutemov" Date: Thu, 18 Sep 2008 18:07:05 +0300 Message-Id: <1221750426-14863-7-git-send-email-kirill@shutemov.name> In-Reply-To: <1221750426-14863-6-git-send-email-kirill@shutemov.name> References: <1221750426-14863-1-git-send-email-kirill@shutemov.name> <1221750426-14863-2-git-send-email-kirill@shutemov.name> <1221750426-14863-3-git-send-email-kirill@shutemov.name> <1221750426-14863-4-git-send-email-kirill@shutemov.name> <1221750426-14863-5-git-send-email-kirill@shutemov.name> <1221750426-14863-6-git-send-email-kirill@shutemov.name> Subject: [Qemu-devel] [PATCH] Imaplement ioctls MTIOCTOP, MTIOCGET and MTIOCPOS 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 Cc: "Kirill A. Shutemov" Signed-off-by: Kirill A. Shutemov --- linux-user/ioctls.h | 4 ++++ linux-user/syscall.c | 1 + linux-user/syscall_defs.h | 4 ++++ linux-user/syscall_types.h | 6 ++++++ 4 files changed, 15 insertions(+), 0 deletions(-) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index c1ca2d5..685cc71 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -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))) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e90f100..ce99cf6 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -70,6 +70,7 @@ #include #include #include +#include #include "linux_loop.h" #include "qemu.h" diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 52242b6..9896522 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1923,6 +1923,10 @@ struct target_eabi_flock64 { #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 */ diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h index bb4fb4e..283d32d 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -108,3 +108,9 @@ STRUCT(loop_info64, MK_ARRAY(TYPE_CHAR, 64), /* lo_crypt_name */ MK_ARRAY(TYPE_CHAR, 32), /* lo_encrypt_key */ MK_ARRAY(TYPE_ULONGLONG, 2)) /* lo_init */ + + +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) -- 1.5.6.5.GIT