]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
configure: don't check for SG_IO
authorChristoph Hellwig <hch@lst.de>
Thu, 15 Feb 2024 06:54:23 +0000 (07:54 +0100)
committerCarlos Maiolino <cem@kernel.org>
Wed, 13 Mar 2024 07:48:37 +0000 (08:48 +0100)
SG_IO has been around longer than XFS.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
configure.ac
include/builddefs.in
m4/package_libcdev.m4
scrub/Makefile
scrub/disk.c

index 94a4e7ee255ab6cb71635a7a8e41636202e18c75..ae95a3dab7d12df7a511d70d0848d3ab221d9e5f 100644 (file)
@@ -182,7 +182,6 @@ if test "$enable_scrub" = "yes"; then
                 AC_MSG_ERROR([libicu not found.])
         fi
 fi
-AC_HAVE_SG_IO
 AC_HAVE_HDIO_GETGEO
 AC_CONFIG_SYSTEMD_SYSTEM_UNIT_DIR
 AC_CONFIG_CROND_DIR
index a60282729394dc9b60bde1caf7cb67e9d19e2a2d..ba5a55d79565e742994a75efb8d4c9657b4f1e01 100644 (file)
@@ -102,7 +102,6 @@ HAVE_MALLINFO = @have_mallinfo@
 HAVE_MALLINFO2 = @have_mallinfo2@
 HAVE_LIBATTR = @have_libattr@
 HAVE_LIBICU = @have_libicu@
-HAVE_SG_IO = @have_sg_io@
 HAVE_HDIO_GETGEO = @have_hdio_getgeo@
 HAVE_SYSTEMD = @have_systemd@
 SYSTEMD_SYSTEM_UNIT_DIR = @systemd_system_unit_dir@
index 458081b907c53072178af0e0a5ea8fb7ec8a85e5..8a86bab5a5c31b1c0b932f1e636043b22b660fda 100644 (file)
@@ -177,25 +177,6 @@ test = mallinfo2();
     AC_SUBST(have_mallinfo2)
   ])
 
-#
-# Check if we have the SG_IO ioctl
-#
-AC_DEFUN([AC_HAVE_SG_IO],
-  [ AC_MSG_CHECKING([for struct sg_io_hdr ])
-    AC_COMPILE_IFELSE(
-    [  AC_LANG_PROGRAM([[
-#include <scsi/sg.h>
-#include <sys/ioctl.h>
-       ]], [[
-struct sg_io_hdr hdr;
-ioctl(0, SG_IO, &hdr);
-       ]])
-    ], have_sg_io=yes
-       AC_MSG_RESULT(yes),
-       AC_MSG_RESULT(no))
-    AC_SUBST(have_sg_io)
-  ])
-
 #
 # Check if we have the HDIO_GETGEO ioctl
 #
index dc6fadc9197e924fec601798f02d32413f7b0561..2f123ef005e169d218c9b929b728d541ece160b3 100644 (file)
@@ -98,10 +98,6 @@ CFILES += unicrash.c
 LCFLAGS += -DHAVE_LIBICU $(LIBICU_CFLAGS)
 endif
 
-ifeq ($(HAVE_SG_IO),yes)
-LCFLAGS += -DHAVE_SG_IO
-endif
-
 ifeq ($(HAVE_HDIO_GETGEO),yes)
 LCFLAGS += -DHAVE_HDIO_GETGEO
 endif
index addb964d72f984494ab852d3f6125739a66f94b0..0ec29d965bd6a807e8c42b42dad9be55c6296959 100644 (file)
@@ -10,9 +10,7 @@
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/statvfs.h>
-#ifdef HAVE_SG_IO
-# include <scsi/sg.h>
-#endif
+#include <scsi/sg.h>
 #ifdef HAVE_HDIO_GETGEO
 # include <linux/hdreg.h>
 #endif
@@ -90,14 +88,13 @@ disk_heads(
  * works if we're talking to a raw SCSI device, and only if we trust the
  * firmware.
  */
-#ifdef HAVE_SG_IO
-# define SENSE_BUF_LEN         64
-# define VERIFY16_CMDLEN       16
-# define VERIFY16_CMD          0x8F
-
-# ifndef SG_FLAG_Q_AT_TAIL
-#  define SG_FLAG_Q_AT_TAIL    0x10
-# endif
+#define SENSE_BUF_LEN          64
+#define VERIFY16_CMDLEN        16
+#define VERIFY16_CMD           0x8F
+
+#ifndef SG_FLAG_Q_AT_TAIL
+# define SG_FLAG_Q_AT_TAIL     0x10
+#endif
 static int
 disk_scsi_verify(
        struct disk             *disk,
@@ -167,9 +164,6 @@ disk_scsi_verify(
 
        return blockcount << BBSHIFT;
 }
-#else
-# define disk_scsi_verify(...)         (ENOTTY)
-#endif /* HAVE_SG_IO */
 
 /* Test the availability of the kernel scrub ioctl. */
 static bool