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

format-text: check for _text_create_text_instance

Test if 'fid' creation failed and report stack trace,
break the loop and do not pass NULL fid further.
This commit is contained in:
Zdenek Kabelac 2012-12-14 21:34:28 +01:00
parent 740ab81d03
commit ff5612c0c3
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.99 -
===================================
Add check for created fid in _scan_file.
Log output also to syslog when abort_on_internal_error is set.
Add LV snapshot support to liblvm and python-lvm.
Avoid a global lock in pvs when lvmetad is in use.

View File

@ -1089,7 +1089,10 @@ static int _scan_file(const struct format_type *fmt, const char *vgname)
/* FIXME: Check this fid is OK! */
fic.type = FMT_INSTANCE_PRIVATE_MDAS;
fic.context.private = NULL;
fid = _text_create_text_instance(fmt, &fic);
if (!(fid = _text_create_text_instance(fmt, &fic))) {
stack;
break;
}
if ((vg = _vg_read_file_name(fid, scanned_vgname,
path))) {
/* FIXME Store creation host in vg */