summaryrefslogtreecommitdiffstats
path: root/hw/misc/slavio_misc.c
diff options
context:
space:
mode:
authorMax Reitz2017-05-22 21:52:15 +0200
committerMax Reitz2017-05-29 15:39:54 +0200
commit0d54a6fed3ebaf0e17656a712e5d6575c712459b (patch)
tree44445a3b56a65d8d14984c3b66b92f70cb66c930 /hw/misc/slavio_misc.c
parentblock: Tweak error message related to qemu-img amend (diff)
downloadqemu-0d54a6fed3ebaf0e17656a712e5d6575c712459b.tar.gz
qemu-0d54a6fed3ebaf0e17656a712e5d6575c712459b.tar.xz
qemu-0d54a6fed3ebaf0e17656a712e5d6575c712459b.zip
block: Fix backing paths for filenames with colons
path_combine() naturally tries to preserve a protocol prefix. However, it recognizes such a prefix by scanning for the first colon; which is different from what path_has_protocol() does: There only is a protocol prefix if there is a colon before the first slash. A protocol prefix that is not recognized by path_has_protocol() is none, and should thus not be taken as one. Case in point, before this patch: $ ./qemu-img create -f qcow2 -b backing.qcow2 ./top:image.qcow2 qemu-img: ./top:image.qcow2: Could not open './top:backing.qcow2': No such file or directory Afterwards: $ ./qemu-img create -f qcow2 -b backing.qcow2 ./top:image.qcow2 qemu-img: ./top:image.qcow2: Could not open './backing.qcow2': No such file or directory Reported-by: yangyang <yangyang@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20170522195217.12991-2-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'hw/misc/slavio_misc.c')
0 files changed, 0 insertions, 0 deletions