summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorDaniel P. Berrangé2022-10-04 11:32:03 +0200
committerLaurent Vivier2022-10-21 17:46:19 +0200
commitc5495f4ecb0cdaaf2e9dddeb48f1689cdb520ca0 (patch)
tree19356823cd9b8a3493c2d2cb1f21d030b5bdd4a1 /linux-user
parentlinux-user: don't use AT_EXECFD in do_openat() (diff)
downloadqemu-c5495f4ecb0cdaaf2e9dddeb48f1689cdb520ca0.tar.gz
qemu-c5495f4ecb0cdaaf2e9dddeb48f1689cdb520ca0.tar.xz
qemu-c5495f4ecb0cdaaf2e9dddeb48f1689cdb520ca0.zip
linux-user: add more compat ioctl definitions
GLibc changes prevent us from including linux/fs.h anymore, and we previously adjusted to this in commit 3cd3df2a9584e6f753bb62a0028bd67124ab5532 Author: Daniel P. Berrangé <berrange@redhat.com> Date: Tue Aug 2 12:41:34 2022 -0400 linux-user: fix compat with glibc >= 2.36 sys/mount.h That change required adding compat ioctl definitions on the QEMU side for any ioctls that we would otherwise obtain from linux/fs.h. This commit adds more that were initially missed, due to their usage being conditionalized in QEMU. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20221004093206.652431-2-berrange@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 665db67c05..d499cac1d5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -111,6 +111,31 @@
#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
#define FS_IOC32_GETVERSION _IOR('v', 1, int)
#define FS_IOC32_SETVERSION _IOW('v', 2, int)
+
+#define BLKGETSIZE64 _IOR(0x12,114,size_t)
+#define BLKDISCARD _IO(0x12,119)
+#define BLKIOMIN _IO(0x12,120)
+#define BLKIOOPT _IO(0x12,121)
+#define BLKALIGNOFF _IO(0x12,122)
+#define BLKPBSZGET _IO(0x12,123)
+#define BLKDISCARDZEROES _IO(0x12,124)
+#define BLKSECDISCARD _IO(0x12,125)
+#define BLKROTATIONAL _IO(0x12,126)
+#define BLKZEROOUT _IO(0x12,127)
+
+#define FIBMAP _IO(0x00,1)
+#define FIGETBSZ _IO(0x00,2)
+
+struct file_clone_range {
+ __s64 src_fd;
+ __u64 src_offset;
+ __u64 src_length;
+ __u64 dest_offset;
+};
+
+#define FICLONE _IOW(0x94, 9, int)
+#define FICLONERANGE _IOW(0x94, 13, struct file_clone_range)
+
#else
#include <linux/fs.h>
#endif