Skip to contentSkip to conversation

LVM2/tools pvcreate.c

PATCH [email protected] 1 participant 1 message Mar 16, 2010

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2010-03-16 15:48:28

Modified files:
tools : pvcreate.c

Log message:
replace existing_pv with existing_pvl

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvcreate.c.diff?cvsroot=lvm2&r1=1.89&r2=1.90

tools/pvcreate.c +5 -5
@@ -28,8 +28,8 @@
 					    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 @@
 				  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);
 	}