Libfdisk uses libblkid to check for filesystems on the device. It
makes sense for both libraries to share the logical sector size
setting, as this setting can be modified by using the fdisk command
line.
We do not see this as an issue, as filesystem detection rarely depends
on sector size (with the exception of some RAIDs). Additionally,
libblkid is usually intelligent enough to check multiple locations
independently of the current device's sector size setting.
Addresses: https://github.com/util-linux/util-linux/pull/3235
Signed-off-by: Karel Zak <kzak@redhat.com>
DBG(WIPE, ul_debugobj(wp, "blkid_probe_set_device() failed [rc=%d]", rc));
return rc;
}
+ blkid_probe_set_sectorsize(pr, cxt->sector_size);
DBG(WIPE, ul_debugobj(wp, " wiping..."));
blkid_wipe_all(pr);
free(cxt->collision);
cxt->collision = NULL;
+ blkid_probe_set_sectorsize(pr, cxt->sector_size);
+
blkid_probe_enable_superblocks(pr, 1);
blkid_probe_set_superblocks_flags(pr, BLKID_SUBLKS_TYPE |
BLKID_SUBLKS_BADCSUM);