aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-02-15 07:54:23 +0100
committerCarlos Maiolino <cem@kernel.org>2024-03-13 08:48:37 +0100
commit0b50e9fa9ade99c94e5802760941a3f0c99d0105 (patch)
tree1089d20ade40491070f65be1a3e8b05fda95fb4e
parent86b43bd0ddc5e565252cf26d9ccc94bf409a2fb5 (diff)
downloadxfsprogs-dev-0b50e9fa9ade99c94e5802760941a3f0c99d0105.tar.gz
configure: don't check for SG_IO
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>
-rw-r--r--configure.ac1
-rw-r--r--include/builddefs.in1
-rw-r--r--m4/package_libcdev.m419
-rw-r--r--scrub/Makefile4
-rw-r--r--scrub/disk.c22
5 files changed, 8 insertions, 39 deletions
diff --git a/configure.ac b/configure.ac
index 94a4e7ee25..ae95a3dab7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/include/builddefs.in b/include/builddefs.in
index a602827293..ba5a55d795 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -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@
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 458081b907..8a86bab5a5 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -178,25 +178,6 @@ test = 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
#
AC_DEFUN([AC_HAVE_HDIO_GETGEO],
diff --git a/scrub/Makefile b/scrub/Makefile
index dc6fadc919..2f123ef005 100644
--- a/scrub/Makefile
+++ b/scrub/Makefile
@@ -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
diff --git a/scrub/disk.c b/scrub/disk.c
index addb964d72..0ec29d965b 100644
--- a/scrub/disk.c
+++ b/scrub/disk.c
@@ -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