public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: cem@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 08/27] configure: require libblkid
Date: Mon, 29 Jan 2024 08:31:56 +0100	[thread overview]
Message-ID: <20240129073215.108519-9-hch@lst.de> (raw)
In-Reply-To: <20240129073215.108519-1-hch@lst.de>

We can't support block device access (which is the reason for xfsprogs
to exist) without blkid.  Make it a hard requirement and remove the
stubs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 configure.ac         |  8 --------
 include/builddefs.in |  4 ----
 libxfs/topology.c    | 37 +------------------------------------
 3 files changed, 1 insertion(+), 48 deletions(-)

diff --git a/configure.ac b/configure.ac
index 58048945c..a94360090 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,11 +36,6 @@ AC_ARG_ENABLE(gettext,
 	enable_gettext=yes)
 AC_SUBST(enable_gettext)
 
-AC_ARG_ENABLE(blkid,
-[  --enable-blkid=[yes/no]   Enable use of block device id library [default=yes]],,
-	enable_blkid=yes)
-AC_SUBST(enable_blkid)
-
 AC_ARG_ENABLE(editline,
 [  --enable-editline=[yes/no] Enable editline command editing [default=no]],
 	test $enable_editline = yes && libeditline="-ledit",
@@ -208,10 +203,7 @@ AC_HAVE_HDIO_GETGEO
 AC_CONFIG_SYSTEMD_SYSTEM_UNIT_DIR
 AC_CONFIG_CROND_DIR
 AC_CONFIG_UDEV_RULE_DIR
-
-if test "$enable_blkid" = yes; then
 AC_HAVE_BLKID_TOPO
-fi
 
 if test "$enable_ubsan" = "yes" || test "$enable_ubsan" = "probe"; then
         AC_PACKAGE_CHECK_UBSAN
diff --git a/include/builddefs.in b/include/builddefs.in
index b5bfbb1f2..a00283da1 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -86,7 +86,6 @@ RPM_VERSION	= @rpm_version@
 ENABLE_SHARED	= @enable_shared@
 ENABLE_GETTEXT	= @enable_gettext@
 ENABLE_EDITLINE	= @enable_editline@
-ENABLE_BLKID	= @enable_blkid@
 ENABLE_SCRUB	= @enable_scrub@
 
 HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
@@ -144,9 +143,6 @@ endif
 ifeq ($(HAVE_FSETXATTR),yes)
 PCFLAGS+= -DHAVE_FSETXATTR
 endif
-ifeq ($(ENABLE_BLKID),yes)
-PCFLAGS+= -DENABLE_BLKID
-endif
 ifeq ($(NEED_INTERNAL_FSXATTR),yes)
 PCFLAGS+= -DOVERRIDE_SYSTEM_FSXATTR
 endif
diff --git a/libxfs/topology.c b/libxfs/topology.c
index 06013d429..4515d238d 100644
--- a/libxfs/topology.c
+++ b/libxfs/topology.c
@@ -6,9 +6,7 @@
 
 #include "libxfs_priv.h"
 #include "libxcmd.h"
-#ifdef ENABLE_BLKID
-#  include <blkid/blkid.h>
-#endif /* ENABLE_BLKID */
+#include <blkid/blkid.h>
 #include "xfs_multidisk.h"
 #include "libfrog/platform.h"
 
@@ -96,7 +94,6 @@ done:
  *	 0 for nothing found
  *	-1 for internal error
  */
-#ifdef ENABLE_BLKID
 int
 check_overwrite(
 	const char	*device)
@@ -253,38 +250,6 @@ out_free_probe:
 		_("warning: unable to probe device topology for device %s\n"),
 		device);
 }
-#else /* ifdef ENABLE_BLKID */
-/*
- * Without blkid, we can't do a good check for signatures.
- * So instead of some messy attempts, just disable any checks
- * and always return 'nothing found'.
- */
-#  warning BLKID is disabled, so signature detection and block device\
- access are not working!
-int
-check_overwrite(
-	const char	*device)
-{
-	return 1;
-}
-
-static void blkid_get_topology(
-	const char	*device,
-	int		*sunit,
-	int		*swidth,
-	int		*lsectorsize,
-	int		*psectorsize,
-	int		force_overwrite)
-{
-	/*
-	 * Shouldn't make any difference (no blkid = no block device access),
-	 * but make sure this dummy replacement returns with at least some
-	 * sanity.
-	 */
-	*lsectorsize = *psectorsize = 512;
-}
-
-#endif /* ENABLE_BLKID */
 
 void
 get_topology(
-- 
2.39.2


  parent reply	other threads:[~2024-01-29  7:32 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29  7:31 decrufify the configure checks Christoph Hellwig
2024-01-29  7:31 ` [PATCH 01/27] include: remove the filldir_t typedef Christoph Hellwig
2024-01-29  7:31 ` [PATCH 02/27] include: unconditionally define umode_t Christoph Hellwig
2024-01-29  7:31 ` [PATCH 03/27] repair: refactor the BLKMAP_NEXTS_MAX check Christoph Hellwig
2024-02-14 23:11   ` Dave Chinner
2024-02-15  5:24     ` Christoph Hellwig
2024-01-29  7:31 ` [PATCH 04/27] include: stop using SIZEOF_LONG Christoph Hellwig
2024-01-29  7:31 ` [PATCH 05/27] include: stop generating platform_defs.h Christoph Hellwig
2024-01-29  7:31 ` [PATCH 06/27] io: don't redefine SEEK_DATA and SEEK_HOLE Christoph Hellwig
2024-01-29  7:31 ` [PATCH 07/27] configure: don't check for getmntent Christoph Hellwig
2024-01-29  7:31 ` Christoph Hellwig [this message]
2024-01-29  7:31 ` [PATCH 09/27] configure: don't check for fadvise Christoph Hellwig
2024-01-29  7:31 ` [PATCH 10/27] configure: don't check for sendfile Christoph Hellwig
2024-01-29  7:31 ` [PATCH 11/27] configure: don't check for madvise Christoph Hellwig
2024-01-29  7:32 ` [PATCH 12/27] configure: don't check for mincor Christoph Hellwig
2024-01-29  7:32 ` [PATCH 13/27] configure: don't check for fiemap Christoph Hellwig
2024-01-29  7:32 ` [PATCH 14/27] configure: don't check for sync_file_range Christoph Hellwig
2024-01-29  7:32 ` [PATCH 15/27] configure: don't check for readdir Christoph Hellwig
2024-01-29  7:32 ` [PATCH 16/27] configure: don't check for fls Christoph Hellwig
2024-01-29  7:32 ` [PATCH 17/27] configure: don't check for fallocate Christoph Hellwig
2024-01-29  7:32 ` [PATCH 18/27] configure: don't check for syncfs Christoph Hellwig
2024-01-29  7:32 ` [PATCH 19/27] configure: don't check for preadv and pwritev Christoph Hellwig
2024-01-29  7:32 ` [PATCH 20/27] configure: don't check for mremap Christoph Hellwig
2024-01-29  7:32 ` [PATCH 21/27] configure: don't check for fsetxattr Christoph Hellwig
2024-01-29  7:32 ` [PATCH 22/27] configure: don't check for the f_flags field in statfs Christoph Hellwig
2024-01-29  7:32 ` [PATCH 23/27] configure: don't check for mallinfo Christoph Hellwig
2024-02-02  6:44   ` Sam James
2024-02-03  7:44     ` Christoph Hellwig
2024-01-29  7:32 ` [PATCH 24/27] configure: don't check for openat Christoph Hellwig
2024-01-29  7:32 ` [PATCH 25/27] configure: don't check for fstatat Christoph Hellwig
2024-01-29  7:32 ` [PATCH 26/27] configure: don't check for SG_IO Christoph Hellwig
2024-01-29  7:32 ` [PATCH 27/27] configure: don't check for HDIO_GETGEO Christoph Hellwig
2024-01-30  4:52 ` decrufify the configure checks Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240129073215.108519-9-hch@lst.de \
    --to=hch@lst.de \
    --cc=cem@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox