Prepare tools_detect_signatures for new filter type.

This commit is contained in:
Ondrej Kozina
2022-04-07 14:38:43 +02:00
committed by Milan Broz
parent 83ef36bd59
commit 8c350b65a3
4 changed files with 13 additions and 7 deletions

View File

@@ -197,7 +197,8 @@ static void report_superblock(const char *value, const char *device, bool batch_
log_std(_("WARNING: Device %s already contains a '%s' superblock signature.\n"), device, value);
}
int tools_detect_signatures(const char *device, int ignore_luks, size_t *count, bool batch_mode)
int tools_detect_signatures(const char *device, tools_probe_filter_info filter,
size_t *count,bool batch_mode)
{
int r;
size_t tmp_count;
@@ -221,7 +222,7 @@ int tools_detect_signatures(const char *device, int ignore_luks, size_t *count,
blk_set_chains_for_full_print(h);
if (ignore_luks && blk_superblocks_filter_luks(h)) {
if (filter == PRB_FILTER_LUKS && blk_superblocks_filter_luks(h)) {
r = -EINVAL;
goto out;
}