empty before obtaining the dev name
If dev->aliases linked list is empty, then directly obtain the str
address of dm_str_list saved in dev_aliases.n, an unknown address
will be returned, which may cause segfault.
So we need to judge whether the dev->aliases linked list is empty before
getting it to avoid returning unknown address.
Fix issue: https://gitee.com/src-openeuler/lvm2/issues/I4RZP9
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
(cherry picked from commit 100c4fb387f1c6f9c5c54b377dcdd72c87c0c0bd)
check DM_NAME before creating symlink in 13-dm-disk.rules.
Fix issue: https://gitee.com/src-openeuler/lvm2/issues/I4RZLO
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
(cherry picked from commit 0cfb6fa80f12fb71c19e5a6b8d76eac838ecd333)