mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Check for alloc error
Simplify segtype_str usage and check for NULL segtype.
This commit is contained in:
parent
cf518842b4
commit
1281a5e3d5
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.94 -
|
Version 2.02.94 -
|
||||||
====================================
|
====================================
|
||||||
|
Check for alloc fail from get_segtype_from_string() in _lvcreate_params().
|
||||||
Add _rimage as reserved suffix to lvm.8 man page.
|
Add _rimage as reserved suffix to lvm.8 man page.
|
||||||
Improve error logging from mpath filter.
|
Improve error logging from mpath filter.
|
||||||
Check for allocation failure in hold_lock() in clvmd.
|
Check for allocation failure in hold_lock() in clvmd.
|
||||||
|
@ -652,10 +652,13 @@ static int _lvcreate_params(struct lvcreate_params *lp,
|
|||||||
else
|
else
|
||||||
segtype_str = "striped";
|
segtype_str = "striped";
|
||||||
|
|
||||||
lp->segtype = get_segtype_from_string(cmd, arg_str_value(cmd, type_ARG, segtype_str));
|
segtype_str = arg_str_value(cmd, type_ARG, segtype_str);
|
||||||
|
|
||||||
|
if (!(lp->segtype = get_segtype_from_string(cmd, segtype_str)))
|
||||||
|
return_0;
|
||||||
|
|
||||||
if (seg_unknown(lp)) {
|
if (seg_unknown(lp)) {
|
||||||
log_error("Unable to create LV with unknown segment type %s.", arg_str_value(cmd, type_ARG, segtype_str));
|
log_error("Unable to create LV with unknown segment type %s.", segtype_str);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user