803fb7
From f1faa24b260222e70d38492e5e3f126700dbd9f8 Mon Sep 17 00:00:00 2001
803fb7
From: Lukas Nykryn <lnykryn@redhat.com>
803fb7
Date: Wed, 4 Mar 2015 16:10:36 +0100
803fb7
Subject: [PATCH] Revert "blkid: Warn when rejecting a superblock with a bad
803fb7
 csum"
803fb7
803fb7
This reverts commit d47f6ca5f9b7a0b400d8bdb050151a0284fb4bdb.
803fb7
---
803fb7
 README                        |  2 +-
803fb7
 configure.ac                  |  2 +-
803fb7
 src/udev/udev-builtin-blkid.c | 13 +------------
803fb7
 3 files changed, 3 insertions(+), 14 deletions(-)
803fb7
803fb7
diff --git a/README b/README
803fb7
index 287d05c9b..ac2a81c0c 100644
803fb7
--- a/README
803fb7
+++ b/README
803fb7
@@ -115,7 +115,7 @@ REQUIREMENTS:
803fb7
         libcap
803fb7
         libmount >= 2.20 (from util-linux)
803fb7
         libseccomp >= 1.0.0 (optional)
803fb7
-        libblkid >= 2.24 (from util-linux) (optional)
803fb7
+        libblkid >= 2.20 (from util-linux) (optional)
803fb7
         libkmod >= 15 (optional)
803fb7
         PAM >= 1.1.2 (optional)
803fb7
         libcryptsetup (optional)
803fb7
diff --git a/configure.ac b/configure.ac
803fb7
index f701bcf71..9c25c3c6f 100644
803fb7
--- a/configure.ac
803fb7
+++ b/configure.ac
803fb7
@@ -437,7 +437,7 @@ AM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
803fb7
 have_blkid=no
803fb7
 AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
803fb7
 if test "x$enable_blkid" != "xno"; then
803fb7
-        PKG_CHECK_MODULES(BLKID, [ blkid >= 2.24 ],
803fb7
+        PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ],
803fb7
                 [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
803fb7
         if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
803fb7
                 AC_MSG_ERROR([*** blkid support requested but libraries not found])
803fb7
diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c
803fb7
index 03e3dc286..89995831b 100644
803fb7
--- a/src/udev/udev-builtin-blkid.c
803fb7
+++ b/src/udev/udev-builtin-blkid.c
803fb7
@@ -221,7 +221,6 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
803fb7
         blkid_probe pr;
803fb7
         const char *data;
803fb7
         const char *name;
803fb7
-        const char *prtype = NULL;
803fb7
         int nvals;
803fb7
         int i;
803fb7
         int err = 0;
803fb7
@@ -257,8 +256,7 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
803fb7
         blkid_probe_set_superblocks_flags(pr,
803fb7
                 BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID |
803fb7
                 BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE |
803fb7
-                BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION |
803fb7
-                BLKID_SUBLKS_BADCSUM);
803fb7
+                BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION);
803fb7
 
803fb7
         if (noraid)
803fb7
                 blkid_probe_filter_superblocks_usage(pr, BLKID_FLTR_NOTIN, BLKID_USAGE_RAID);
803fb7
@@ -280,15 +278,6 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
803fb7
         err = probe_superblocks(pr);
803fb7
         if (err < 0)
803fb7
                 goto out;
803fb7
-        if (blkid_probe_has_value(pr, "SBBADCSUM")) {
803fb7
-                if (!blkid_probe_lookup_value(pr, "TYPE", &prtype, NULL))
803fb7
-                        log_warning("incorrect %s checksum on %s",
803fb7
-                                    prtype, udev_device_get_devnode(dev));
803fb7
-                else
803fb7
-                        log_warning("incorrect checksum on %s",
803fb7
-                                    udev_device_get_devnode(dev));
803fb7
-                goto out;
803fb7
-        }
803fb7
 
803fb7
         /* If we are a partition then our parent passed on the root
803fb7
          * partition UUID to us */