master - cleanup: add missing WARNING into log_warn
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c10028dd8eb5d2302dfa588bbae034eb24d710cf Commit: c10028dd8eb5d2302dfa588bbae034eb24d710cf Parent: 1a4f13eb6e4de75884f7950a5feeff90614b93cf Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Nov 25 14:17:56 2016 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Nov 25 15:01:27 2016 +0100
cleanup: add missing WARNING into log_warn
--- tools/toollib.c | 6 +++--- tools/vgreduce.c | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-)
tools/toollib.c +3 -3
@@ -578,18 +578,18 @@ static int _create_pv_entry(struct dm_pool *mem, struct pv_list *pvl, pvname =pv_dev_name (pvl->pv);if (allocatable_only && !(pvl->pv->status &ALLOCATABLE_PV )) { -log_warn ("Physical volume %s not allocatable." , pvname); +log_warn ("WARNING: Physical volume %s not allocatable." , pvname);return 1 ; }if (allocatable_only &&is_missing_pv (pvl->pv)) { -log_warn ("Physical volume %s is missing." , pvname); +log_warn ("WARNING: Physical volume %s is missing." , pvname);return 1 ; }if (allocatable_only && (pvl->pv->pe_count == pvl->pv->pe_alloc_count)) { -log_warn ("No free extents on physical volume \"%s\"." , pvname); +log_warn ("WARNING: No free extents on physical volume \"%s\"." , pvname);return 1 ; }
tools/vgreduce.c +4 -2
@@ -67,7 +67,7 @@ static int _consolidate_vg(struct cmd_context *cmd, struct volume_group *vg) cmd->handles_missing_pvs =1 ;log_error ("There are still partial LVs in VG %s." , vg->name);log_error ("To remove them unconditionally use: vgreduce --removemissing --force." ); -log_warn ("Proceeding to remove empty missing PVs." ); +log_warn ("WARNING: Proceeding to remove empty missing PVs." ); } dm_list_iterate_items(pvl, &vg->pvs) {
@@ -114,7 +114,9 @@ static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg)if (!lv_is_visible (lv))continue ; -log_warn ("Removing partial LV %s." , lv->name); + +log_warn ("WARNING: Removing partial LV %s." ,display_lvname (lv)); +if (!lv_remove_with_dependencies (cmd, lv,DONT_PROMPT ,0 )) return_0; goto restart;