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 [email protected] +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
