summaryrefslogtreecommitdiff
path: root/tools/toollib.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2022-01-18 12:15:03 -0600
committerDavid Teigland <teigland@redhat.com>2022-01-18 12:15:03 -0600
commitde7892f0af275615d2db0c7e6a4bbc56cd4962e8 (patch)
tree93606cea8eb3a2071f81a86e16f4059048a6ca79 /tools/toollib.c
parenta972d63c547dc9699c0b3664175eb96b5d89ff8f (diff)
downloadlvm2-de7892f0af275615d2db0c7e6a4bbc56cd4962e8.tar.gz
Revert "pvcreate: overwrite partition header with -f"
This reverts commit d5a950ca67c106403054ecb847e226e8b5a7c30e. This commit did not properly recognize GPT cases.
Diffstat (limited to 'tools/toollib.c')
-rw-r--r--tools/toollib.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/tools/toollib.c b/tools/toollib.c
index 9b193bd2d..f95c98f51 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -5248,10 +5248,6 @@ int pvcreate_each_device(struct cmd_context *cmd,
if (cmd->enable_devices_file && !pp->is_remove)
cmd->filter_deviceid_skip = 1;
- /* pvcreate -f overwrites partitions */
- if (pp->force && !pp->is_remove)
- cmd->filter_partitioned_skip = 1;
-
log_debug("Scanning and filtering device args (%u).", dm_list_size(&scan_devs));
label_scan_devs(cmd, cmd->filter, &scan_devs);
@@ -5266,7 +5262,6 @@ int pvcreate_each_device(struct cmd_context *cmd,
}
}
cmd->filter_deviceid_skip = 0;
- cmd->filter_partitioned_skip = 0;
/*
* Can the command continue if some specified devices were not found?
@@ -5479,9 +5474,6 @@ do_command:
if (cmd->enable_devices_file && !pp->is_remove)
cmd->filter_deviceid_skip = 1;
- if (pp->force && !pp->is_remove)
- cmd->filter_partitioned_skip = 1;
-
log_debug("Rescanning and filtering device args with exclusive open");
if (!label_scan_devs_excl(cmd, cmd->filter, &rescan_devs)) {
log_debug("Failed to rescan devs excl");
@@ -5495,9 +5487,7 @@ do_command:
dm_list_add(&pp->arg_fail, &pd->list);
}
}
-
cmd->filter_deviceid_skip = 0;
- cmd->filter_partitioned_skip = 0;
if (dm_list_empty(&pp->arg_process) && dm_list_empty(&remove_duplicates)) {
log_debug("No devices to process.");