summaryrefslogtreecommitdiff
path: root/tools/toollib.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2021-05-04 13:03:25 -0500
committerDavid Teigland <teigland@redhat.com>2021-05-04 13:08:02 -0500
commit2419345b9d407d8b07327d7484f765ee92be5994 (patch)
treed2d2d167a7b2843d5352513c1108548d3de08200 /tools/toollib.c
parent4dc5d4ac7e7a9457ccc46ff04796b347e58bf4da (diff)
downloadlvm2-2419345b9d407d8b07327d7484f765ee92be5994.tar.gz
pvremove: use consistent error message
When the device is not a PV print "No PV found on device ..." instead of "Failed to read lvm info for ... PVID ." an earlier check had been added with a different message for the same condition.
Diffstat (limited to 'tools/toollib.c')
-rw-r--r--tools/toollib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/toollib.c b/tools/toollib.c
index 8f9ea1e6b..07f065322 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -5028,7 +5028,7 @@ static int _pvremove_check_used(struct cmd_context *cmd,
if (!(info = lvmcache_info_from_pvid(pd->dev->pvid, pd->dev, 0))) {
if (pp->force)
return 1;
- log_error("Failed to read lvm info for %s PVID %s.", dev_name(pd->dev), pd->dev->pvid);
+ log_error("No PV found on device %s.", dev_name(pd->dev));
dm_list_move(&pp->arg_fail, &pd->list);
return 0;
}