1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Always check result of _set_vg_name()

This commit is contained in:
Zdenek Kabelac 2012-02-27 10:00:23 +00:00
parent 7e25b8f932
commit 24d39aa142
2 changed files with 9 additions and 6 deletions

View File

@ -1,6 +1,7 @@
Version 2.02.94 -
====================================
Drop unused call to uname() during clvmd initia.lization.
====================================
Always check result of _set_vg_name() in lvcreate.
Drop unused call to uname() during clvmd initialization.
Test allocation result in sysfs filter creation.
Limit sscanf parameters with buffer size in clvmd get_initial_state().
Use const lv pointer for lv_is_active...() functions.

View File

@ -93,8 +93,9 @@ static int _lvcreate_name_params(struct lvcreate_params *lp,
lp->origin = ptr + 1;
}
if (!lp->vg_name)
_set_vg_name(lp, extract_vgname(cmd, NULL));
if (!lp->vg_name &&
!_set_vg_name(lp, extract_vgname(cmd, NULL)))
return_0;
if (!lp->vg_name) {
log_error("The origin name should include the "
@ -115,8 +116,9 @@ static int _lvcreate_name_params(struct lvcreate_params *lp,
if (!_set_vg_name(lp, extract_vgname(cmd, lp->pool)))
return_0;
if (!lp->vg_name)
_set_vg_name(lp, extract_vgname(cmd, NULL));
if (!lp->vg_name &&
!_set_vg_name(lp, extract_vgname(cmd, NULL)))
return_0;
if (!lp->vg_name) {
log_error("The pool name should include the "