mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
linux-user: Always use flexible arrays for dirent d_name
We currently use a flexible array member for target_dirent, but use incorrectly fixed length arrays for target_dirent64, linux_dirent and linux_dirent64. This requires that we adjust the definition of the VFAT READDIR ioctls which hard-code the 256 namelen size into the ioctl constant. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20211114103539.298686-3-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
fd08ddb9cb
commit
540a736f54
2 changed files with 7 additions and 5 deletions
|
@ -197,8 +197,10 @@
|
|||
//#define DEBUG_ERESTARTSYS
|
||||
|
||||
//#include <linux/msdos_fs.h>
|
||||
#define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct linux_dirent [2])
|
||||
#define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct linux_dirent [2])
|
||||
#define VFAT_IOCTL_READDIR_BOTH \
|
||||
_IOC(_IOC_READ, 'r', 1, (sizeof(struct linux_dirent) + 256) * 2)
|
||||
#define VFAT_IOCTL_READDIR_SHORT \
|
||||
_IOC(_IOC_READ, 'r', 2, (sizeof(struct linux_dirent) + 256) * 2)
|
||||
|
||||
#undef _syscall0
|
||||
#undef _syscall1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue