[libvirt] [libvirt-glib 2/6] gconfig: Add GVirConfigDomainDiskFormat enum
Christophe Fergeau
cfergeau at redhat.com
Wed Jun 5 08:43:45 UTC 2013
On Tue, Jun 04, 2013 at 08:03:53PM +0200, Michal Privoznik wrote:
> On 04.06.2013 18:50, Christophe Fergeau wrote:
> > ---
> > libvirt-gconfig/libvirt-gconfig-domain-disk.h | 20 ++++++++++++++++++++
> > libvirt-gconfig/libvirt-gconfig.sym | 2 ++
> > 2 files changed, 22 insertions(+)
> >
> > diff --git a/libvirt-gconfig/libvirt-gconfig-domain-disk.h b/libvirt-gconfig/libvirt-gconfig-domain-disk.h
> > index 7363d31..e80a2fc 100644
> > --- a/libvirt-gconfig/libvirt-gconfig-domain-disk.h
> > +++ b/libvirt-gconfig/libvirt-gconfig-domain-disk.h
> > @@ -101,6 +101,26 @@ typedef enum {
> > GVIR_CONFIG_DOMAIN_DISK_STARTUP_POLICY_OPTIONAL
> > } GVirConfigDomainDiskStartupPolicy;
> >
> > +typedef enum {
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_RAW,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_DIR,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_BOCHS,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_CLOOP,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_COW,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_DMG,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_ISO,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_QCOW,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_QCOW2,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_QED,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_VMDK,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_VPC,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_FAT,
> > + GVIR_CONFIG_DOMAIN_DISK_FORMAT_VHD,
> > +} GVirConfigDomainDiskFormat;
> > +
> > +/* backward compatibility */
> > +#define GVIR_CONFIG_DOMAIN_DISK_FORMAT_AIO GVIR_CONFIG_DOMAIN_DISK_FORMAT_RAW;
>
> Backward compatibility?
This was added because of this bit in domainconf.rng:
<define name="driverFormat">
<attribute name="name">
<ref name="genericName"/>
</attribute>
<optional>
<attribute name='type'>
<choice>
<ref name='storageFormat'/>
<value>aio</value> <!-- back-compat for 'raw' -->
</choice>
</attribute>
</optional>
</define>
but seeing how it's used in domain_conf.c:
} else if (!driverName &&
xmlStrEqual(cur->name, BAD_CAST "driver")) {
driverName = virXMLPropString(cur, "name");
driverType = virXMLPropString(cur, "type");
if (STREQ_NULLABLE(driverType, "aio")) {
/* In-place conversion to "raw", for Xen back-compat */
driverType[0] = 'r';
driverType[1] = 'a';
driverType[2] = 'w';
}
it's probably not very useful to have it...
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130605/07bc03e5/attachment-0001.sig>
More information about the libvir-list
mailing list