1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

blkid: fix BLKID_SUBLKS_FSINFO usage

Use this flag for all fs info lookups, including BLOCK_SIZE,
if it is defined in blkid.h.
This commit is contained in:
David Teigland 2022-09-29 15:25:32 -05:00
parent 5a0052a1d3
commit b09de683c7

View File

@ -25,12 +25,7 @@
#include "device_mapper/misc/dm-ioctl.h"
#ifdef BLKID_WIPING_SUPPORT
#include <blkid.h>
/*
* FIXME: recent addition to blkid.h copied here.
* Remove this and require a recent libblkid version from configure.
*/
#define BLKID_SUBLKS_FSINFO (1 << 11) /* read and define fs properties from superblock */
#include <blkid/blkid.h>
#endif
#ifdef UDEV_SYNC_SUPPORT
@ -847,6 +842,9 @@ int fs_block_size_and_type(const char *pathname, uint32_t *fs_block_size_bytes,
BLKID_SUBLKS_UUID | BLKID_SUBLKS_UUIDRAW |
BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE |
BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION |
#ifdef BLKID_SUBLKS_FSINFO
BLKID_SUBLKS_FSINFO |
#endif
BLKID_SUBLKS_MAGIC);
rc = blkid_do_safeprobe(probe);
if (rc < 0) {
@ -906,7 +904,10 @@ int fs_get_blkid(const char *pathname, struct fs_info *fsi)
BLKID_SUBLKS_UUID | BLKID_SUBLKS_UUIDRAW |
BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE |
BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION |
BLKID_SUBLKS_MAGIC | BLKID_SUBLKS_FSINFO);
#ifdef BLKID_SUBLKS_FSINFO
BLKID_SUBLKS_FSINFO |
#endif
BLKID_SUBLKS_MAGIC);
rc = blkid_do_safeprobe(probe);
if (rc < 0) {
log_error("Failed libblkid probe for %s", pathname);