mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
linux-user: Correct type for LOOP_GET_STATUS{,64} ioctls
The LOOP_GET_STATUS and LOOP_GET_STATUS64 ioctls were incorrectly defined as IOC_W rather than IOC_R, which meant we weren't correctly copying the information back from the kernel to the guest. The loop_info64 structure definition was also missing a member and using the wrong type for several 32-bit fields. In particular, this meant that "kpartx -d image.img" didn't work and "losetup -a" behaved strangely. Correct the ioctl type definitions. Reported-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
committed by
Riku Voipio
parent
a4a2c51f90
commit
f2c2fb50be
@@ -103,10 +103,11 @@ STRUCT(loop_info64,
|
||||
TYPE_ULONGLONG, /* lo_inode */
|
||||
TYPE_ULONGLONG, /* lo_rdevice */
|
||||
TYPE_ULONGLONG, /* lo_offset */
|
||||
TYPE_ULONG, /* lo_number */
|
||||
TYPE_ULONG, /* lo_encrypt_type */
|
||||
TYPE_ULONG, /* lo_encrypt_key_size */
|
||||
TYPE_ULONG, /* lo_flags */
|
||||
TYPE_ULONGLONG, /* lo_sizelimit */
|
||||
TYPE_INT, /* lo_number */
|
||||
TYPE_INT, /* lo_encrypt_type */
|
||||
TYPE_INT, /* lo_encrypt_key_size */
|
||||
TYPE_INT, /* lo_flags */
|
||||
MK_ARRAY(TYPE_CHAR, 64), /* lo_name */
|
||||
MK_ARRAY(TYPE_CHAR, 64), /* lo_crypt_name */
|
||||
MK_ARRAY(TYPE_CHAR, 32), /* lo_encrypt_key */
|
||||
|
||||
Reference in New Issue
Block a user