summaryrefslogtreecommitdiff
path: root/lib
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:22:28 -0500
commit73b9a2805ca2f2c70f6f631b405f8fea3f72f23b (patch)
tree84235f1cb6aa777d821cab9715caedd64578d855 /lib
parente60d7ce8e748cb6d51552879c162d01aafa17160 (diff)
downloadlvm2-73b9a2805ca2f2c70f6f631b405f8fea3f72f23b.tar.gz
exit with error when --devicesfile name doesn't exist
Diffstat (limited to 'lib')
-rw-r--r--lib/cache/lvmcache.c3
-rw-r--r--lib/label/label.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 0e62cd267..61a2fee6d 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -1600,7 +1600,8 @@ int lvmcache_label_scan(struct cmd_context *cmd)
* with infos/vginfos based on reading headers from
* each device, and a vg summary from each mda.
*/
- label_scan(cmd);
+ if (!label_scan(cmd))
+ return_0;
/*
* When devnames are used as device ids (which is dispreferred),
diff --git a/lib/label/label.c b/lib/label/label.c
index 06958b502..00ede2b76 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -800,7 +800,7 @@ static int _setup_bcache(void)
}
if (!(scan_bcache = bcache_create(BCACHE_BLOCK_SIZE_IN_SECTORS, cache_blocks, ioe))) {
- log_error("Failed to create bcache with %d cache blocks.", cache_blocks);
+ log_error("Failed to set up io layer with %d blocks.", cache_blocks);
return 0;
}
@@ -1015,7 +1015,7 @@ int label_scan(struct cmd_context *cmd)
* data to invalidate.)
*/
if (!(iter = dev_iter_create(NULL, 0))) {
- log_error("Scanning failed to get devices.");
+ log_error("Failed to get device list.");
return 0;
}
while ((dev = dev_iter_get(cmd, iter))) {