Major distributions already have blkid >= 2.37.
Let's bump the minimal required version.
Note, util-linux (which provides blkid) 2.37 was released on 2021-06-01.
See also #38608.
libmount >= 2.30 (from util-linux)
(util-linux *must* be built without --enable-libmount-support-mtab)
libseccomp >= 2.3.1 (optional)
- libblkid >= 2.24 (from util-linux) (optional)
+ libblkid >= 2.37 (from util-linux) (optional)
libkmod >= 15 (optional)
PAM >= 1.1.2 (optional)
libcryptsetup >= 2.0.1 (optional),
libaudit_cflags = libaudit.partial_dependency(includes: true, compile_args: true)
libblkid = dependency('blkid',
+ version : '>=2.37.0',
required : get_option('blkid'))
conf.set10('HAVE_BLKID', libblkid.found())
-conf.set10('HAVE_BLKID_PROBE_SET_HINT',
- libblkid.found() and cc.has_function('blkid_probe_set_hint', dependencies : libblkid))
libblkid_cflags = libblkid.partial_dependency(includes: true, compile_args: true)
libkmod = dependency('libkmod',
switch (option) {
case 'H':
-#if HAVE_BLKID_PROBE_SET_HINT
errno = 0;
r = sym_blkid_probe_set_hint(pr, optarg, 0);
if (r < 0)
return log_device_error_errno(dev, errno_or_else(ENOMEM), "Failed to use '%s' probing hint: %m", optarg);
break;
-#else
- /* Use the hint <name>=<offset> as probing offset for old versions */
- optarg = strchr(optarg, '=');
- if (!optarg)
- /* no value means 0, do nothing for old versions */
- break;
- ++optarg;
- _fallthrough_;
-#endif
case 'o':
r = safe_atoi64(optarg, &offset);
if (r < 0)
sym_blkid_probe_set_superblocks_flags(pr,
BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID |
BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE |
-#ifdef BLKID_SUBLKS_FSINFO
+#ifdef BLKID_SUBLKS_FSINFO /* since util-linux 2.39 */
BLKID_SUBLKS_FSINFO |
#endif
BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION);