summaryrefslogtreecommitdiff
path: root/tools/pvcreate.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2010-03-16 15:48:27 +0000
committerAlasdair Kergon <agk@redhat.com>2010-03-16 15:48:27 +0000
commit11c289c27aad9d36b76d7f611cbf2512a6e1e2d3 (patch)
tree43880f5eabf27da4bfc3c2f61db05e4d98be2c4d /tools/pvcreate.c
parentcccae7e633fca3c035e16eac33a348795ad4819d (diff)
downloadlvm2-11c289c27aad9d36b76d7f611cbf2512a6e1e2d3.tar.gz
replace existing_pv with existing_pvl
Diffstat (limited to 'tools/pvcreate.c')
-rw-r--r--tools/pvcreate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/pvcreate.c b/tools/pvcreate.c
index 561d6457e..df7664b5a 100644
--- a/tools/pvcreate.c
+++ b/tools/pvcreate.c
@@ -28,8 +28,8 @@ static int pvcreate_restore_params_validate(struct cmd_context *cmd,
struct pvcreate_params *pp)
{
const char *uuid = NULL;
- void *existing_pv;
struct volume_group *vg;
+ struct pv_list *existing_pvl;
if (arg_count(cmd, restorefile_ARG) && !arg_count(cmd, uuidstr_ARG)) {
log_error("--uuid is required with --restorefile");
@@ -56,14 +56,14 @@ static int pvcreate_restore_params_validate(struct cmd_context *cmd,
pp->restorefile);
return 0;
}
- if (!(existing_pv = find_pv_in_vg_by_uuid(vg, pp->idp)->pv)) {
+ if (!(existing_pvl = find_pv_in_vg_by_uuid(vg, pp->idp))) {
log_error("Can't find uuid %s in backup file %s",
uuid, pp->restorefile);
return 0;
}
- pp->pe_start = pv_pe_start(existing_pv);
- pp->extent_size = pv_pe_size(existing_pv);
- pp->extent_count = pv_pe_count(existing_pv);
+ pp->pe_start = pv_pe_start(existing_pvl->pv);
+ pp->extent_size = pv_pe_size(existing_pvl->pv);
+ pp->extent_count = pv_pe_count(existing_pvl->pv);
vg_release(vg);
}