Skip to contentSkip to conversation

main - cov: check setup_devices return code

PATCH Zdenek Kabelac 1 participant 1 message Apr 23, 2021

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d95b26fae0bdab7d306f0dff1d9328a697e041f3
Commit:        d95b26fae0bdab7d306f0dff1d9328a697e041f3
Parent:        ece80cd0fbce92d2ce248913fceffbf15e9d37f0
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Apr 22 12:34:16 2021 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Apr 23 23:00:55 2021 +0200

cov: check setup_devices return code

---
 tools/pvck.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/pvck.c +2 -2
index 6bc1c091f..74663ec43 100644
@@ -3187,8 +3187,8 @@ int pvck(struct cmd_context *cmd, int argc, char **argv)
 
 	if (argc == 1)
 		setup_device(cmd, argv[0]);
-	else
-		setup_devices(cmd);
+	else if (!setup_devices(cmd))
+		return ECMD_FAILED;
 
 	for (i = 0; i < argc; i++) {
 		pv_name = argv[i];