[libvirt] [PATCH] conf: fix backing store parse off-by-one

Eric Blake eblake at redhat.com
Thu May 22 17:30:11 UTC 2014


On 05/22/2014 01:22 AM, Jiri Denemark wrote:
> On Wed, May 21, 2014 at 22:06:08 -0600, Eric Blake wrote:
>> Commit 546154e parses the type attribute from a <backingStore>
>> element, but forgot that the earlier commit 9673418 added a
>> placeholder element in the same 1.2.3 release; as a result,
>> the C code was mistakenly allowing "none" as a type.
>>
>> Similarly, the same commit allows "none" as the <format>
>> sub-element type, even though that has been a placeholder
>> since the 0.10.2 release with commit f772b3d.
>>
>> * src/conf/domain_conf.c (virDomainDiskBackingStoreParse): Require
>> non-zero types.
>>
>> Signed-off-by: Eric Blake <eblake at redhat.com>
>>
>> ---
>> Maybe worth addressing in a later patch: the RelaxNG grammar
>> currently requires a <format> and <backingStore> subelement
>> to any non-empty <backingStore>, and the C code matches this
>> requirement.  However, we should probably make both of them
>> optional, to represent the case where the user is requesting
>> that we perform a probe to complete the backing chain details.
> 
> Right, however, this change will only make sense when we actually add
> support for user-supplied backing chains so implementing this part
> earlier is useless and perhaps even confusing.

Good, we're on the same page about delaying that for another patch.

> 
> ACK

The off-by-one fixes are now pushed.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140522/ac1babba/attachment-0001.sig>


More information about the libvir-list mailing list