diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b5a9a6691e..055b9797a3 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4972,7 +4972,7 @@ virDomainDiskSourceParse(xmlNodePtr node, memset(&host, 0, sizeof(host)); - switch (src->type) { + switch ((virStorageType)src->type) { case VIR_STORAGE_TYPE_FILE: src->path = virXMLPropString(node, "file"); break; @@ -14847,7 +14847,7 @@ virDomainDiskSourceFormat(virBufferPtr buf, startupPolicy = virDomainStartupPolicyTypeToString(policy); if (src->path || src->nhosts > 0 || src->srcpool || startupPolicy) { - switch (src->type) { + switch ((virStorageType)src->type) { case VIR_STORAGE_TYPE_FILE: virBufferAddLit(buf, "path); diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9ae1a968f3..193959f5d1 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -11021,7 +11021,7 @@ qemuParseCommandLine(virCapsPtr qemuCaps, if (disk->src.type == VIR_STORAGE_TYPE_NETWORK) { char *port; - switch (disk->src.protocol) { + switch ((virStorageNetProtocol) disk->src.protocol) { case VIR_STORAGE_NET_PROTOCOL_NBD: if (qemuParseNBDString(disk) < 0) goto error; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 55b47552f8..cab653b5d6 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -12368,7 +12368,7 @@ qemuDomainSnapshotPrepareDiskExternalBackingInactive(virDomainDiskDefPtr disk) return 0; case VIR_STORAGE_TYPE_NETWORK: - switch (disk->src.protocol) { + switch ((virStorageNetProtocol) disk->src.protocol) { case VIR_STORAGE_NET_PROTOCOL_NBD: case VIR_STORAGE_NET_PROTOCOL_RBD: case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG: @@ -12430,7 +12430,7 @@ qemuDomainSnapshotPrepareDiskExternalOverlayActive(virDomainSnapshotDiskDefPtr d return 0; case VIR_STORAGE_TYPE_NETWORK: - switch (disk->src.protocol) { + switch ((virStorageNetProtocol) disk->src.protocol) { case VIR_STORAGE_NET_PROTOCOL_GLUSTER: return 0; @@ -12575,7 +12575,7 @@ qemuDomainSnapshotPrepareDiskInternal(virConnectPtr conn, return 0; case VIR_STORAGE_TYPE_NETWORK: - switch (disk->src.protocol) { + switch ((virStorageNetProtocol) disk->src.protocol) { case VIR_STORAGE_NET_PROTOCOL_NBD: case VIR_STORAGE_NET_PROTOCOL_RBD: case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG: @@ -12801,7 +12801,7 @@ qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver, VIR_STRDUP(persistSource, snap->src.path) < 0) goto cleanup; - switch (snap->src.type) { + switch ((virStorageType)snap->src.type) { case VIR_STORAGE_TYPE_BLOCK: reuse = true; /* fallthrough */ diff --git a/src/util/virstorageencryption.h b/src/util/virstorageencryption.h index 0a9bf44c01..f63c9eeb1a 100644 --- a/src/util/virstorageencryption.h +++ b/src/util/virstorageencryption.h @@ -39,7 +39,7 @@ VIR_ENUM_DECL(virStorageEncryptionSecret) typedef struct _virStorageEncryptionSecret virStorageEncryptionSecret; typedef virStorageEncryptionSecret *virStorageEncryptionSecretPtr; struct _virStorageEncryptionSecret { - virStorageEncryptionSecretType type; + int type; /* virStorageEncryptionSecretType */ unsigned char uuid[VIR_UUID_BUFLEN]; }; @@ -55,7 +55,7 @@ VIR_ENUM_DECL(virStorageEncryptionFormat) typedef struct _virStorageEncryption virStorageEncryption; typedef virStorageEncryption *virStorageEncryptionPtr; struct _virStorageEncryption { - virStorageEncryptionFormatType format; + int format; /* virStorageEncryptionFormatType */ size_t nsecrets; virStorageEncryptionSecretPtr *secrets; diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index bdc79440c0..f875b6999d 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -151,7 +151,7 @@ typedef virStorageNetHostDef *virStorageNetHostDefPtr; struct _virStorageNetHostDef { char *name; char *port; - virStorageNetHostTransport transport; + int transport; /* virStorageNetHostTransport */ char *socket; /* path to unix socket */ }; @@ -183,10 +183,10 @@ typedef struct _virStorageSourcePoolDef virStorageSourcePoolDef; struct _virStorageSourcePoolDef { char *pool; /* pool name */ char *volume; /* volume name */ - virStorageVolType voltype; /* internal only */ + int voltype; /* virStorageVolType, internal only */ int pooltype; /* virStoragePoolType from storage_conf.h, internal only */ - virStorageType actualtype; /* internal only */ - virStorageSourcePoolMode mode; + int actualtype; /* virStorageType, internal only */ + int mode; /* virStorageSourcePoolMode */ }; typedef virStorageSourcePoolDef *virStorageSourcePoolDefPtr; @@ -209,15 +209,15 @@ typedef virStorageSource *virStorageSourcePtr; * backing chains, multiple source disks join to form a single guest * view. */ struct _virStorageSource { - virStorageType type; + int type; /* virStorageType */ char *path; - virStorageNetProtocol protocol; + int protocol; /* virStorageNetProtocol */ size_t nhosts; virStorageNetHostDefPtr hosts; virStorageSourcePoolDefPtr srcpool; struct { char *username; - virStorageSecretType secretType; + int secretType; /* virStorageSecretType */ union { unsigned char uuid[VIR_UUID_BUFLEN]; char *usage;