[libvirt] [PATCH v2 1/4] conf: add rawio attribute to disk element of domain XML

Eric Blake eblake at redhat.com
Tue Jan 31 22:15:46 UTC 2012


On 01/31/2012 11:53 AM, Laine Stump wrote:
> I also found that "make check wouldn't pass, which was mostly traced to
> the concept of making the default value of rawio "-1". The problem with
> this is that there are other functions that create and fill-in domain
> structures, and they hadn't been taught about this default value. I
> changed the object to have a "bool rawio_specified", and modified the
> parse and format functions accordingly.

We could have also solved this by using a three-state enum with the
default state being 0 rather than -1:

enum {
   VIR_DOMAIN_DISK_RAWIO_DEFAULT = 0,
   VIR_DOMAIN_DISK_RAWIO_NO = 1,
   VIR_DOMAIN_DISK_RAWIO_YES = 2,
}

which we have done for other setups, as that avoids the need for a
separate bool value.  But I'm not too worried about what you did to
bother changing things.

-- 
Eric Blake   eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120131/8d5cfe0a/attachment-0001.sig>


More information about the libvir-list mailing list