]> xenbits.xensource.com Git - libvirt.git/commit
storageVolCreateXMLFrom: Check if backend knows how to createVol
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 10 Feb 2016 16:17:00 +0000 (17:17 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 12 Feb 2016 15:16:58 +0000 (16:16 +0100)
commit611a278fa46d3136b7fe5c6ab05e660ca3c8fdf4
tree5a1c5fde1a4fdf9b34fb0dee1c548c429c56d6c0
parent78490acc399902666788e6d142e3e216f13928a8
storageVolCreateXMLFrom: Check if backend knows how to createVol

It is highly unlikely that a backend will know how to create a
volume from a different volume (buildVolFrom) and not know how to
create an empty volume (createVol). But:
1) we call the function without any prior check so if that's the
case we would SIGSEGV immediatelly
2) it's better to be safe than sorry.

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