]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storagefile: qcow1: Fix check for empty backing file
authorCole Robinson <crobinso@redhat.com>
Fri, 4 Oct 2019 22:00:55 +0000 (18:00 -0400)
committerCole Robinson <crobinso@redhat.com>
Fri, 11 Oct 2019 17:41:21 +0000 (13:41 -0400)
commitb00616870b6a508cb8899a5a4ad14157bdb9d45c
tree90aab87bf0196ae9ee0408fd65dd12b2ac1581ba
parent9f508ec7ca490640cb03e7fb92e8f1b42a41d3b7
storagefile: qcow1: Fix check for empty backing file

From f772b3d91fd the intention of this code seems to be to set
format=NONE when the image does not have a backing file. However
'buf' here is the whole qcow1 file header. What we want to be
checking is 'res' which is the parsed backing file path.
qcowXGetBackingStore sets this to NULL when there's no backing file.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
src/util/virstoragefile.c