Detail: fix segfault during IMSM raid creation
It can be reproduced with non IMSM hardware and IMSM_NO_PLATFORM
environmental variable set. The array state is inactive when creating
an IMSM container. And the structure info is NULL because load_super()
always fails since no intel HBA information could be obtained.
Signed-off-by: Lidong Zhong <lidong.zhong@suse.com>
Reported-by: Tkaczyk Mariusz <mariusz.tkaczyk@intel.com>
Fixes: 64bf4dff34
(Detail: show correct raid level when the array is inactive)
This commit is contained in:
parent
97b51a2c2d
commit
c3129b39a7
2
Detail.c
2
Detail.c
|
@ -224,7 +224,7 @@ int Detail(char *dev, struct context *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ok, we have some info to print... */
|
/* Ok, we have some info to print... */
|
||||||
if (inactive)
|
if (inactive && info)
|
||||||
str = map_num(pers, info->array.level);
|
str = map_num(pers, info->array.level);
|
||||||
else
|
else
|
||||||
str = map_num(pers, array.level);
|
str = map_num(pers, array.level);
|
||||||
|
|
Loading…
Reference in New Issue