mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Add option to probe only superblocks in blkid.
This commit is contained in:
committed by
Milan Broz
parent
be5c5788d4
commit
2388777763
@@ -73,14 +73,20 @@ void blk_set_chains_for_full_print(struct blkid_handle *h)
|
||||
blk_set_chains_for_wipes(h);
|
||||
}
|
||||
|
||||
void blk_set_chains_for_superblocks(struct blkid_handle *h)
|
||||
{
|
||||
#ifdef HAVE_BLKID
|
||||
blkid_probe_enable_superblocks(h->pr, 1);
|
||||
blkid_probe_set_superblocks_flags(h->pr, BLKID_SUBLKS_TYPE);
|
||||
#endif
|
||||
}
|
||||
|
||||
void blk_set_chains_for_fast_detection(struct blkid_handle *h)
|
||||
{
|
||||
#ifdef HAVE_BLKID
|
||||
blkid_probe_enable_partitions(h->pr, 1);
|
||||
blkid_probe_set_partitions_flags(h->pr, 0);
|
||||
|
||||
blkid_probe_enable_superblocks(h->pr, 1);
|
||||
blkid_probe_set_superblocks_flags(h->pr, BLKID_SUBLKS_TYPE);
|
||||
blk_set_chains_for_superblocks(h);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user