]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Add MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov).
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 20 Sep 2008 03:03:09 +0000 (03:03 +0000)
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 20 Sep 2008 03:03:09 +0000 (03:03 +0000)
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5271 c046a42c-6fe2-441c-8c8c-71466251a162

linux-user/ioctls.h
linux-user/syscall.c
linux-user/syscall_defs.h
linux-user/syscall_types.h

index c1ca2d528ddff15e46eb67b74075430ffb519610..685cc71310832a13061c625743619689a0533e89 100644 (file)
   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)))
index 627692a29accb08bce3005ad439580d63432dee7..bceb83163d120ef2196b92438819d2161651286e 100644 (file)
@@ -70,6 +70,7 @@
 #include <linux/hdreg.h>
 #include <linux/soundcard.h>
 #include <linux/kd.h>
+#include <linux/mtio.h>
 #include "linux_loop.h"
 
 #include "qemu.h"
index 52242b6202b649abc6634c734e5ad0868c7e33c7..9896522994b7158eae8e2db6fb26c5ea2f991e5e 100644 (file)
@@ -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 */
index bb4fb4e3d378f27cdc79de67d444e854e08b6836..d3f3df91a380ad73320388a9d7b63899e4048fde 100644 (file)
@@ -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 */
+
+/* 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)