Skip to contentSkip to conversation

master - cleanup: simplify pv name print

PATCH Zdenek Kabelac 1 participant 1 message Mar 19, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=caf93eb1cb74050658dcf1816254ae3666aa3818
Commit:        caf93eb1cb74050658dcf1816254ae3666aa3818
Parent:        506091be70b3ebaed02c5d9c1c8fa991f4382182
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed Mar 19 00:01:00 2014 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed Mar 19 00:58:01 2014 +0100

cleanup: simplify pv name print

pv_vg_name() now already hides orphans.

---
 lib/metadata/metadata.c |    2 +-
 lib/metadata/pv_manip.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
lib/metadata/metadata.c +1 -1
index ff14e16..c79f223 100644
@@ -1408,7 +1408,7 @@ static int pvcreate_check(struct cmd_context *cmd, const char *name,
 		log_warn("WARNING: Forcing physical volume creation on "
 			  "%s%s%s%s", name,
 			  !is_orphan(pv) ? " of volume group \"" : "",
-			  !is_orphan(pv) ? pv_vg_name(pv) : "",
+			  pv_vg_name(pv),
 			  !is_orphan(pv) ? "\"" : "");
 	}
 
lib/metadata/pv_manip.c +1 -1
index cb19be2..3613515 100644
@@ -716,7 +716,7 @@ static int pvremove_check(struct cmd_context *cmd, const char *name,
 		log_warn("WARNING: Wiping physical volume label from "
 			  "%s%s%s%s", name,
 			  !is_orphan(pv) ? " of volume group \"" : "",
-			  !is_orphan(pv) ? pv_vg_name(pv) : "",
+			  pv_vg_name(pv),
 			  !is_orphan(pv) ? "\"" : "");
 	}