[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Imaplement ioctls MTIOCTOP, MTIOCGET and MTIOCPOS
From: |
Kirill A. Shutemov |
Subject: |
[Qemu-devel] [PATCH] Imaplement ioctls MTIOCTOP, MTIOCGET and MTIOCPOS |
Date: |
Thu, 18 Sep 2008 18:07:05 +0300 |
Signed-off-by: Kirill A. Shutemov <address@hidden>
---
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 <linux/soundcard.h>
#include <linux/dirent.h>
#include <linux/kd.h>
+#include <linux/mtio.h>
#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
- [Qemu-devel] [PATCH] Implement futimesat() syscall, (continued)
[Qemu-devel] Linux user emulator maintainer, Kirill A. Shutemov, 2008/09/13
[Qemu-devel] [PATCH] Fix vfork() syscall emulation, Kirill A. Shutemov, 2008/09/18
- [Qemu-devel] [PATCH] Fix getgroups() syscall emulation, Kirill A. Shutemov, 2008/09/18
- [Qemu-devel] [PATCH] Swap only altered elements of the grouplist, Kirill A. Shutemov, 2008/09/18
- [Qemu-devel] [PATCH] Fix pread() and pwrite() syscall on ARM EABI, Kirill A. Shutemov, 2008/09/18
- [Qemu-devel] [PATCH] Implement fstatat64() syscall, Kirill A. Shutemov, 2008/09/18
- [Qemu-devel] [PATCH] Implement futimesat() syscall, Kirill A. Shutemov, 2008/09/18
- [Qemu-devel] [PATCH] Imaplement ioctls MTIOCTOP, MTIOCGET and MTIOCPOS,
Kirill A. Shutemov <=
- [Qemu-devel] [PATCH] Fix building with 2.6.27 kernel headers, Kirill A. Shutemov, 2008/09/18
- Re: [Qemu-devel] [PATCH] Fix building with 2.6.27 kernel headers, Riku Voipio, 2008/09/19
Re: [Qemu-devel] [PATCH] Implement futimesat() syscall, Riku Voipio, 2008/09/19
Re: [Qemu-devel] [PATCH] Implement fstatat64() syscall, Riku Voipio, 2008/09/19
Re: [Qemu-devel] [PATCH] Implement fstatat64() syscall, Kirill A. Shutemov, 2008/09/19
Re: [Qemu-devel] [PATCH] Swap only altered elements of the grouplist, Riku Voipio, 2008/09/19
Re: [Qemu-devel] [PATCH] Fix getgroups() syscall emulation, Riku Voipio, 2008/09/19
Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation, andrzej zaborowski, 2008/09/19