]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virDevMapperGetTargetsImpl: Be tolerant to kernels without DM support
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 13 Jul 2018 12:31:16 +0000 (14:31 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 13 Jul 2018 14:01:05 +0000 (16:01 +0200)
commit170d1e31df064108d064910c77f6316eb6726985
tree744ae4b44263b303f61f978dc6289fc45526eb29
parent318d54e5201295239869655c2c60fb44d9d9466e
virDevMapperGetTargetsImpl: Be tolerant to kernels without DM support

https://bugzilla.redhat.com/show_bug.cgi?id=1591732

If kernel is compiled without CONFIG_BLK_DEV_DM enabled, there is
no /dev/mapper/control device and since dm_task_create() actually
does some ioctl() over it creating a task may fail.
To cope with this handle ENOENT and ENODEV gracefully.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virdevmapper.c