[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] block: Fix backing paths for filenames with
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] block: Fix backing paths for filenames with colons |
Date: |
Mon, 22 May 2017 13:25:35 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 05/22/2017 01:07 PM, Max Reitz wrote:
> 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 <address@hidden>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> block.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature