linux-user: Add FITRIM ioctl
PATCH 1/1 linux-user: Add FITRIM ioctl
From: Michael Vogt <[email protected]>
Tiny patch to add the missing FITRIM ioctl.
Signed-off-by Michael Vogt <[email protected]>
--- linux-user/ioctls.h | 3 +++ linux-user/syscall_defs.h | 1 + linux-user/syscall_types.h | 5 +++++ 3 files changed, 9 insertions(+)
linux-user/ioctls.h +3 -0
@@ -140,6 +140,9 @@#ifdef FITHAW IOCTL(FITHAW, IOC_W | IOC_R, TYPE_INT)#endif +#ifdef FITRIM + IOCTL(FITRIM, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_fstrim_range))) +#endif IOCTL(FIGETBSZ, IOC_R, MK_PTR(TYPE_LONG))#ifdef CONFIG_FIEMAP
linux-user/syscall_defs.h +1 -0
@@ -945,6 +945,7 @@ struct target_rtc_pll_info {#define TARGET_FIFREEZE TARGET_IOWR('X', 119, abi_int)#define TARGET_FITHAW TARGET_IOWR('X', 120, abi_int) +#define TARGET_FITRIM TARGET_IOWR('X', 121, struct fstrim_range)/* * Note that the ioctl numbers for FS_IOC_<GET|SET><FLAGS|VERSION>
linux-user/syscall_types.h +5 -0
@@ -341,6 +341,11 @@ STRUCT(file_clone_range, TYPE_ULONGLONG, /* src_length */ TYPE_ULONGLONG) /* dest_offset */ +STRUCT (fstrim_range, +TYPE_ULONGLONG ,/* start */ +TYPE_ULONGLONG ,/* len */ + TYPE_ULONGLONG) /* minlen */ + STRUCT(fiemap_extent, TYPE_ULONGLONG, /* fe_logical */ TYPE_ULONGLONG, /* fe_physical */
Signature · 1 line
2.43.0
Quoted 10 lines · Michael Vogt
From: Michael Vogt <[email protected]>
Tiny patch to add the missing FITRIM ioctl.
Signed-off-by Michael Vogt <[email protected]>--- linux-user/ioctls.h | 3 +++ linux-user/syscall_defs.h | 1 + linux-user/syscall_types.h | 5 +++++ 3 files changed, 9 insertions(+)
Thanks, queued.
r~