]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainNamespaceSetupDisk: Simplify disk check
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 3 Feb 2017 16:23:10 +0000 (17:23 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 8 Feb 2017 14:56:21 +0000 (15:56 +0100)
commitb7feabbfdc63757fd0a8c3e1995df092c3c58481
tree87444ee159ec1a8b269990c4dc284c22284bccf2
parent786d8d91b446d306cd973f93a3fa56ca85a334c6
qemuDomainNamespaceSetupDisk: Simplify disk check

Firstly, instead of checking for next->path the
virStorageSourceIsEmpty() function should be used which also
takes disk type into account.
Secondly, not every disk source passed has the correct type set
(due to our laziness). Therefore, instead of checking for
virStorageSourceIsBlockLocal() and also S_ISBLK() the former can
be refined to just virStorageSourceIsLocalStorage().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_domain.c