mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix log_error() usage
Cosmetic - skip <bactrace> when error has been just printed in raid segtype. Add missing log_error if allocation would fail for unknown segtype.
This commit is contained in:
parent
102dd99ca4
commit
f1ab501a58
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.89 -
|
Version 2.02.89 -
|
||||||
==================================
|
==================================
|
||||||
|
Fix log_error() usage in raid and unknown segtype initialisation.
|
||||||
Improve testing Makefile.
|
Improve testing Makefile.
|
||||||
Fix install_ocf make target when srcdir != builddir. (2.02.80)
|
Fix install_ocf make target when srcdir != builddir. (2.02.80)
|
||||||
Support env vars LVM_CLVMD_BINARY and LVM_BINARY in clvmd.
|
Support env vars LVM_CLVMD_BINARY and LVM_BINARY in clvmd.
|
||||||
|
@ -338,7 +338,7 @@ static struct segment_type *_init_raid_segtype(struct cmd_context *cmd,
|
|||||||
if (!segtype) {
|
if (!segtype) {
|
||||||
log_error("Failed to allocate memory for %s segtype",
|
log_error("Failed to allocate memory for %s segtype",
|
||||||
raid_type);
|
raid_type);
|
||||||
return_NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
segtype->cmd = cmd;
|
segtype->cmd = cmd;
|
||||||
|
|
||||||
|
@ -94,8 +94,10 @@ struct segment_type *init_unknown_segtype(struct cmd_context *cmd, const char *n
|
|||||||
{
|
{
|
||||||
struct segment_type *segtype = dm_zalloc(sizeof(*segtype));
|
struct segment_type *segtype = dm_zalloc(sizeof(*segtype));
|
||||||
|
|
||||||
if (!segtype)
|
if (!segtype) {
|
||||||
return_NULL;
|
log_error("Failed to allocate memory for unknown segtype");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
segtype->cmd = cmd;
|
segtype->cmd = cmd;
|
||||||
segtype->ops = &_unknown_ops;
|
segtype->ops = &_unknown_ops;
|
||||||
|
Loading…
Reference in New Issue
Block a user