[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 2/3] block/file-*: *_parse_filename() and col
Re: [Qemu-block] [PATCH v2 2/3] block/file-*: *_parse_filename() and colons
Mon, 22 May 2017 15:02:08 -0500
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0
On 05/22/2017 02:52 PM, Max Reitz wrote:
> The file drivers' *_parse_filename() implementations just strip the
> optional protocol prefix off the filename. However, for e.g.
> "file:foo:bar", this would lead to "foo:bar" being stored as the BDS's
> filename which looks like it should be managed using the "foo" protocol.
> This is especially troublesome if you then try to resolve a backing
> filename based on "foo:bar".
> This issue can only occur if the stripped part is a relative filename
> ("file:/foo:bar" will be shortened to "/foo:bar" and having a slash
> before the first colon means that "/foo" is not recognized as a protocol
> part). Therefore, we can easily fix it by prepending "./" to such
Reviewed-by: Eric Blake <address@hidden>
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Description: OpenPGP digital signature