summaryrefslogtreecommitdiff
path: root/tools/pvcreate.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2022-07-05 17:08:00 -0500
committerDavid Teigland <teigland@redhat.com>2022-07-06 10:10:58 -0500
commit92b4fcf57f3c6d212d06b72b097e1a06e6efb84b (patch)
tree0374dbb21837fc5e051c5508c65b30b883069370 /tools/pvcreate.c
parentd0f94e763d6e6bca491c74cea93ec3062f32757e (diff)
downloadlvm2-92b4fcf57f3c6d212d06b72b097e1a06e6efb84b.tar.gz
exit with error when --devicesfile name doesn't exist
Diffstat (limited to 'tools/pvcreate.c')
-rw-r--r--tools/pvcreate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/pvcreate.c b/tools/pvcreate.c
index 71eb060a3..a1ef0e9e1 100644
--- a/tools/pvcreate.c
+++ b/tools/pvcreate.c
@@ -144,7 +144,8 @@ int pvcreate(struct cmd_context *cmd, int argc, char **argv)
cmd->create_edit_devices_file = 1;
- lvmcache_label_scan(cmd);
+ if (!lvmcache_label_scan(cmd))
+ return_ECMD_FAILED;
if (!(handle = init_processing_handle(cmd, NULL))) {
log_error("Failed to initialize processing handle.");