Skip to contentSkip to conversation

master - vgchange: use NULL 'feature' of lv_info call

PATCH Zdenek Kabelac 1 participant 1 message Sep 24, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=93fbef1a45948c1f97fe484b4dd65179afa5051d
Commit:        93fbef1a45948c1f97fe484b4dd65179afa5051d
Parent:        5b70bdc104991056a9e1c3f97c07b6f0ba3ae998
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed Sep 24 10:01:14 2014 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed Sep 24 10:54:47 2014 +0200

vgchange: use NULL 'feature' of lv_info call

When NULL is passed for info the call itself
already does the same evaluation.

---
 tools/vgchange.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
tools/vgchange.c +1 -3
index e817910..350d8a3 100644
@@ -23,15 +23,13 @@ static int _monitor_lvs_in_vg(struct cmd_context *cmd,
 {
 	struct lv_list *lvl;
 	struct logical_volume *lv;
-	struct lvinfo info;
 	int r = 1;
 
 	dm_list_iterate_items(lvl, &vg->lvs) {
 		lv = lvl->lv;
 
 		if (!lv_info(cmd, lv, lv_is_thin_pool(lv) ? 1 : 0,
-			     &info, 0, 0) ||
-		    !info.exists)
+			     NULL, 0, 0))
 			continue;
 		/*
 		 * FIXME: Need to consider all cases... PVMOVE, etc