From: Karel Zak Date: Tue, 13 Jan 2026 17:38:24 +0000 (+0100) Subject: findmnt: fix misleading warning messages for ntfs3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a80b2f8c46dd823104b609d3cff2fd7157ec9cc2;p=thirdparty%2Futil-linux.git findmnt: fix misleading warning messages for ntfs3 * Remap fstab aliases like "ntfs3" to "ntfs" as reported by libblkid. * Use mounttype (from --with-ntfs-mounttype=) to check if supported by the kernel rather than the type provided by libblkid. * Don't check if the kernel supports type read from filesystem if an explicit type specified in fstab. Fixes: https://github.com/util-linux/util-linux/issues/3912 Addresses: https://github.com/util-linux/util-linux/pull/3963 Signed-off-by: Karel Zak --- diff --git a/misc-utils/findmnt-verify.c b/misc-utils/findmnt-verify.c index 2a220dc59..ed0250353 100644 --- a/misc-utils/findmnt-verify.c +++ b/misc-utils/findmnt-verify.c @@ -17,6 +17,7 @@ #include "xalloc.h" #include "pathnames.h" #include "match.h" +#include "mountutils.h" #include "findmnt.h" @@ -461,16 +462,28 @@ static int verify_fstype(struct verify_context *vfy, struct findmnt *findmnt) } if (realtype) { + const char *mounttype; + isswap = strcmp(realtype, "swap") == 0; vfy->no_fsck = strcmp(realtype, "xfs") == 0 || strcmp(realtype, "btrfs") == 0; + /* libblkid always reports "ntfs"; remap possible different + * names from fstab to "ntfs" as well */ + if (type && strcmp(type, "ntfs3") == 0) + type = "ntfs"; + if (type && !isauto && strcmp(type, realtype) != 0) { verify_warn(vfy, _("%s does not match with on-disk %s"), type, realtype); goto done; } - if (!isswap && !is_supported_filesystem(vfy, realtype)) { - verify_warn(vfy, _("on-disk %s seems unsupported by the current kernel"), realtype); + + mounttype = ul_fstype_to_mounttype(realtype) ? : realtype; + + if (!isswap + && (!type || isauto) + && !is_supported_filesystem(vfy, mounttype)) { + verify_warn(vfy, _("on-disk %s seems unsupported by the current kernel"), mounttype); goto done; }