mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
cleanup: better error message
Use display_lvname.
This commit is contained in:
parent
1f2a42c7b7
commit
6dadebb1e4
@ -2246,19 +2246,20 @@ static int _lvconvert_merge_thin_snapshot(struct cmd_context *cmd,
|
||||
/* Check if merge is possible */
|
||||
if (lv_is_merging_origin(origin)) {
|
||||
log_error("Snapshot %s is already merging into the origin.",
|
||||
find_snapshot(origin)->lv->name);
|
||||
display_lvname(find_snapshot(origin)->lv));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lv_is_external_origin(origin)) {
|
||||
log_error("\"%s\" is read-only external origin \"%s\".",
|
||||
lv->name, origin_from_cow(lv)->name);
|
||||
origin = origin_from_cow(lv);
|
||||
log_error("%s is read-only external origin %s.",
|
||||
display_lvname(lv), display_lvname(origin));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lv_is_origin(origin)) {
|
||||
log_error("Merging into the old snapshot origin %s is not supported.",
|
||||
origin->name);
|
||||
display_lvname(origin));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2288,7 +2289,8 @@ static int _lvconvert_merge_thin_snapshot(struct cmd_context *cmd,
|
||||
goto_out;
|
||||
|
||||
if (origin_is_active && !activate_lv(cmd, lv)) {
|
||||
log_error("Failed to reactivate origin %s.", lv->name);
|
||||
log_error("Failed to reactivate origin %s.",
|
||||
display_lvname(lv));
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user