1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-12 08:13:48 +03:00

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.
This commit is contained in:
David Teigland 2021-05-04 13:03:25 -05:00
parent 4dc5d4ac7e
commit 2419345b9d

View File

@ -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;
}