1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: pvck validates setup_device return value

This commit is contained in:
Zdenek Kabelac 2021-09-20 10:33:33 +02:00
parent b6e9892bc6
commit 6427803252

View File

@ -3178,9 +3178,10 @@ int pvck(struct cmd_context *cmd, int argc, char **argv)
* but this is here to preserve the historical output.
*/
if (argc == 1)
setup_device(cmd, argv[0]);
else if (!setup_devices(cmd))
if (argc == 1) {
if (!setup_device(cmd, argv[0]))
return_ECMD_FAILED;
} else if (!setup_devices(cmd))
return_ECMD_FAILED;
for (i = 0; i < argc; i++) {