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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]