Skip to contentSkip to conversation

master - vgchange: fix error code in error path

PATCH Zdenek Kabelac 1 participant 1 message Jun 14, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=70b159d145dfa960a53f6f61ce735b90ec25b1e0
Commit:        70b159d145dfa960a53f6f61ce735b90ec25b1e0
Parent:        3eff3aa4f8faa5a84de2ba696b15a976fad31852
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed Jun 13 15:57:51 2018 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Jun 14 22:02:01 2018 +0200

vgchange: fix error code in error path

This rather hard to hit error path used wrong return value to signal real error.

---
 tools/vgchange.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/vgchange.c +1 -1
index 891f22a..b608d87 100644
@@ -187,7 +187,7 @@ int vgchange_activate(struct cmd_context *cmd, struct volume_group *vg,
 	    strcmp(vg->system_id, cmd->system_id) &&
 	    do_activate) {
 		log_error("Cannot activate LVs in a foreign VG.");
-		return ECMD_FAILED;
+		return 0;
 	}
 
 	/*