diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-11-29 17:46:00 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-11-29 17:46:00 +0100 |
commit | 095c7737fbb8f25f7458290e4b5e5aa198f10a60 (patch) | |
tree | 0c940859cb2923dc1749b928c071424e292cffc6 | |
parent | b1641c50975c5f9e5fdbd651ab63386716a0eb38 (diff) | |
parent | 0a761ce30338526213f74dfe9900b9213d4bbb0b (diff) | |
download | qemu-095c7737fbb8f25f7458290e4b5e5aa198f10a60.zip qemu-095c7737fbb8f25f7458290e4b5e5aa198f10a60.tar.gz qemu-095c7737fbb8f25f7458290e4b5e5aa198f10a60.tar.bz2 |
Merge tag 'linux-user-for-6.2-pull-request' of git://github.com/vivier/qemu into staging
linux-user pull request 20211129
Fix losetup
# gpg: Signature made Mon 29 Nov 2021 03:04:30 PM CET
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
* tag 'linux-user-for-6.2-pull-request' of git://github.com/vivier/qemu:
linux-user: implement more loop ioctls
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r-- | linux-user/ioctls.h | 4 | ||||
-rw-r--r-- | linux-user/linux_loop.h | 2 | ||||
-rw-r--r-- | linux-user/syscall_defs.h | 4 | ||||
-rw-r--r-- | linux-user/syscall_types.h | 6 |
4 files changed, 16 insertions, 0 deletions
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 7193c3b..f182d40 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -637,6 +637,10 @@ IOCTL(LOOP_SET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64))) IOCTL(LOOP_GET_STATUS64, IOC_R, MK_PTR(MK_STRUCT(STRUCT_loop_info64))) IOCTL(LOOP_CHANGE_FD, 0, TYPE_INT) + IOCTL(LOOP_SET_CAPACITY, 0, TYPE_INT) + IOCTL(LOOP_SET_DIRECT_IO, 0, TYPE_INT) + IOCTL(LOOP_SET_BLOCK_SIZE, 0, TYPE_INT) + IOCTL(LOOP_CONFIGURE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_config))) IOCTL(LOOP_CTL_ADD, 0, TYPE_INT) IOCTL(LOOP_CTL_REMOVE, 0, TYPE_INT) diff --git a/linux-user/linux_loop.h b/linux-user/linux_loop.h index c69fea1..f80b96f 100644 --- a/linux-user/linux_loop.h +++ b/linux-user/linux_loop.h @@ -96,6 +96,8 @@ struct loop_info64 { #define LOOP_CHANGE_FD 0x4C06 #define LOOP_SET_CAPACITY 0x4C07 #define LOOP_SET_DIRECT_IO 0x4C08 +#define LOOP_SET_BLOCK_SIZE 0x4C09 +#define LOOP_CONFIGURE 0x4C0A /* /dev/loop-control interface */ #define LOOP_CTL_ADD 0x4C80 diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 41aaafb..0b13975 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1219,6 +1219,10 @@ struct target_rtc_pll_info { #define TARGET_LOOP_SET_STATUS64 0x4C04 #define TARGET_LOOP_GET_STATUS64 0x4C05 #define TARGET_LOOP_CHANGE_FD 0x4C06 +#define TARGET_LOOP_SET_CAPACITY 0x4C07 +#define TARGET_LOOP_SET_DIRECT_IO 0x4C08 +#define TARGET_LOOP_SET_BLOCK_SIZE 0x4C09 +#define TARGET_LOOP_CONFIGURE 0x4C0A #define TARGET_LOOP_CTL_ADD 0x4C80 #define TARGET_LOOP_CTL_REMOVE 0x4C81 diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h index ba2c151..c3b43f8 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -201,6 +201,12 @@ STRUCT(loop_info64, MK_ARRAY(TYPE_CHAR, 32), /* lo_encrypt_key */ MK_ARRAY(TYPE_ULONGLONG, 2)) /* lo_init */ +STRUCT(loop_config, + TYPE_INT, /* fd */ + TYPE_INT, /* block_size */ + MK_STRUCT(STRUCT_loop_info64), /* info */ + MK_ARRAY(TYPE_ULONGLONG, 8)) /* __reserved */ + /* mag tape ioctls */ STRUCT(mtop, TYPE_SHORT, TYPE_INT) STRUCT(mtget, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_LONG, |