1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

lvconvert: fix accepting second lv name

Do not allow to accept second LV name on lvconvert --thinpool
command line.
This commit is contained in:
Zdenek Kabelac 2013-02-04 13:56:54 +01:00
parent d3b8f270ea
commit be5ad90703
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.99 - Version 2.02.99 -
=================================== ===================================
Do not take a free lv name argument for lvconvert --thinpool option.
Avoid flushing thin pool when quering for transaction_id. Avoid flushing thin pool when quering for transaction_id.
Add internal function lv_layer() to obtain layer name for LV. Add internal function lv_layer() to obtain layer name for LV.
Report partial and in-sync RAID attribute based on kernel status Report partial and in-sync RAID attribute based on kernel status

View File

@ -92,7 +92,12 @@ static int _lvconvert_name_params(struct lvconvert_params *lp,
lp->origin = ptr + 1; lp->origin = ptr + 1;
} }
if (!*pargc && lp->pool_data_lv_name) { if (lp->pool_data_lv_name) {
if (*pargc) {
log_error("More then one logical volume name name specified.");
return 0;
}
if (!lp->vg_name || !validate_name(lp->vg_name)) { if (!lp->vg_name || !validate_name(lp->vg_name)) {
log_error("Please provide a valid volume group name."); log_error("Please provide a valid volume group name.");
return 0; return 0;