0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. From 274f00f33411caee51973a9f7701daf194da5a0a Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
  3. Date: Tue, 10 Jan 2023 12:49:00 -0500
  4. Subject: [PATCH] Revert "linux-user: add more compat ioctl definitions"
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. This reverts commit c5495f4ecb0cdaaf2e9dddeb48f1689cdb520ca0.
  9. glibc has fixed (in 2.36.9000-40-g774058d729) the problem
  10. that caused a clash when both sys/mount.h annd linux/mount.h
  11. are included, and backported this to the 2.36 stable release
  12. too:
  13. https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
  14. It is saner for QEMU to remove the workaround it applied for
  15. glibc 2.36 and expect distros to ship the 2.36 maint release
  16. with the fix. This avoids needing to add a further workaround
  17. to QEMU to deal with the fact that linux/brtfs.h now also pulls
  18. in linux/mount.h via linux/fs.h since Linux 6.1
  19. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
  20. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
  21. Message-Id: <20230110174901.2580297-2-berrange@redhat.com>
  22. Signed-off-by: Laurent Vivier <laurent@vivier.eu>
  23. Upstream: https://gitlab.com/qemu-project/qemu/-/commit/9f0246539ae84a5e21efd1cc4516fc343f08115a
  24. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  25. ---
  26. linux-user/syscall.c | 25 -------------------------
  27. 1 file changed, 25 deletions(-)
  28. diff --git a/linux-user/syscall.c b/linux-user/syscall.c
  29. index 24b25759be..10af5e0d8e 100644
  30. --- a/linux-user/syscall.c
  31. +++ b/linux-user/syscall.c
  32. @@ -111,31 +111,6 @@
  33. #define FS_IOC32_SETFLAGS _IOW('f', 2, int)
  34. #define FS_IOC32_GETVERSION _IOR('v', 1, int)
  35. #define FS_IOC32_SETVERSION _IOW('v', 2, int)
  36. -
  37. -#define BLKGETSIZE64 _IOR(0x12,114,size_t)
  38. -#define BLKDISCARD _IO(0x12,119)
  39. -#define BLKIOMIN _IO(0x12,120)
  40. -#define BLKIOOPT _IO(0x12,121)
  41. -#define BLKALIGNOFF _IO(0x12,122)
  42. -#define BLKPBSZGET _IO(0x12,123)
  43. -#define BLKDISCARDZEROES _IO(0x12,124)
  44. -#define BLKSECDISCARD _IO(0x12,125)
  45. -#define BLKROTATIONAL _IO(0x12,126)
  46. -#define BLKZEROOUT _IO(0x12,127)
  47. -
  48. -#define FIBMAP _IO(0x00,1)
  49. -#define FIGETBSZ _IO(0x00,2)
  50. -
  51. -struct file_clone_range {
  52. - __s64 src_fd;
  53. - __u64 src_offset;
  54. - __u64 src_length;
  55. - __u64 dest_offset;
  56. -};
  57. -
  58. -#define FICLONE _IOW(0x94, 9, int)
  59. -#define FICLONERANGE _IOW(0x94, 13, struct file_clone_range)
  60. -
  61. #else
  62. #include <linux/fs.h>
  63. #endif
  64. --
  65. 2.25.1