diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c index e26b8db364..52c643d1b5 100644 --- a/src/conf/domain_audit.c +++ b/src/conf/domain_audit.c @@ -67,7 +67,7 @@ virDomainAuditChardevPath(virDomainChrSourceDefPtr chr) if (!chr) return NULL; - switch ((enum virDomainChrType) chr->type) { + switch ((virDomainChrType) chr->type) { case VIR_DOMAIN_CHR_TYPE_PTY: case VIR_DOMAIN_CHR_TYPE_DEV: case VIR_DOMAIN_CHR_TYPE_FILE: @@ -150,7 +150,7 @@ virDomainAuditRNG(virDomainObjPtr vm, const char *virt; if (newDef) { - switch ((enum virDomainRNGBackend) newDef->backend) { + switch ((virDomainRNGBackend) newDef->backend) { case VIR_DOMAIN_RNG_BACKEND_RANDOM: if (newDef->source.file) newsrcpath = newDef->source.file; @@ -168,7 +168,7 @@ virDomainAuditRNG(virDomainObjPtr vm, } if (oldDef) { - switch ((enum virDomainRNGBackend) oldDef->backend) { + switch ((virDomainRNGBackend) oldDef->backend) { case VIR_DOMAIN_RNG_BACKEND_RANDOM: if (oldDef->source.file) oldsrcpath = oldDef->source.file; diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 56df5bcf31..fe06921976 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1073,7 +1073,7 @@ virDomainObjPtr virDomainObjListFindByName(virDomainObjListPtr doms, bool virDomainObjTaint(virDomainObjPtr obj, - enum virDomainTaintFlags taint) + virDomainTaintFlags taint) { unsigned int flag = (1 << taint); @@ -1124,7 +1124,7 @@ void virDomainGraphicsDefFree(virDomainGraphicsDefPtr def) if (!def) return; - switch ((enum virDomainGraphicsType)def->type) { + switch ((virDomainGraphicsType)def->type) { case VIR_DOMAIN_GRAPHICS_TYPE_VNC: VIR_FREE(def->data.vnc.socket); VIR_FREE(def->data.vnc.keymap); @@ -1505,7 +1505,7 @@ virDomainChrSourceDefIsEqual(const virDomainChrSourceDef *src, if (tgt->type != src->type) return false; - switch ((enum virDomainChrType)src->type) { + switch ((virDomainChrType)src->type) { case VIR_DOMAIN_CHR_TYPE_PTY: case VIR_DOMAIN_CHR_TYPE_DEV: case VIR_DOMAIN_CHR_TYPE_FILE: @@ -7069,7 +7069,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt, static int virDomainChrDefaultTargetType(int devtype) { - switch ((enum virDomainChrDeviceType) devtype) { + switch ((virDomainChrDeviceType) devtype) { case VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL: virReportError(VIR_ERR_XML_ERROR, _("target type must be specified for %s device"), @@ -7101,7 +7101,7 @@ virDomainChrTargetTypeFromString(virDomainChrDefPtr def, if (!targetType) return virDomainChrDefaultTargetType(devtype); - switch ((enum virDomainChrDeviceType) devtype) { + switch ((virDomainChrDeviceType) devtype) { case VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL: ret = virDomainChrChannelTargetTypeFromString(targetType); break; @@ -7257,7 +7257,7 @@ virDomainChrSourceDefParseXML(virDomainChrSourceDefPtr def, if (!mode) mode = virXMLPropString(cur, "mode"); - switch ((enum virDomainChrType) def->type) { + switch ((virDomainChrType) def->type) { case VIR_DOMAIN_CHR_TYPE_PTY: case VIR_DOMAIN_CHR_TYPE_DEV: case VIR_DOMAIN_CHR_TYPE_FILE: @@ -7338,7 +7338,7 @@ virDomainChrSourceDefParseXML(virDomainChrSourceDefPtr def, cur = cur->next; } - switch ((enum virDomainChrType) def->type) { + switch ((virDomainChrType) def->type) { case VIR_DOMAIN_CHR_TYPE_NULL: case VIR_DOMAIN_CHR_TYPE_VC: case VIR_DOMAIN_CHR_TYPE_STDIO: @@ -9044,7 +9044,7 @@ virDomainRNGDefParseXML(xmlNodePtr node, goto error; } - switch ((enum virDomainRNGBackend) def->backend) { + switch ((virDomainRNGBackend) def->backend) { case VIR_DOMAIN_RNG_BACKEND_RANDOM: def->source.file = virXPathString("string(./backend)", ctxt); if (def->source.file && @@ -10611,11 +10611,11 @@ virDomainChrEquals(virDomainChrDefPtr src, !virDomainChrSourceDefIsEqual(&src->source, &tgt->source)) return false; - switch ((enum virDomainChrDeviceType) src->deviceType) { + switch ((virDomainChrDeviceType) src->deviceType) { case VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL: if (src->targetType != tgt->targetType) return false; - switch ((enum virDomainChrChannelTargetType) src->targetType) { + switch ((virDomainChrChannelTargetType) src->targetType) { case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO: return STREQ_NULLABLE(src->target.name, tgt->target.name); break; @@ -10671,7 +10671,7 @@ virDomainChrFind(virDomainDefPtr def, * chrdefptr of the given type. */ static void virDomainChrGetDomainPtrsInternal(virDomainDefPtr vmdef, - enum virDomainChrDeviceType type, + virDomainChrDeviceType type, virDomainChrDefPtr ***arrPtr, size_t **cntPtr) { @@ -10708,7 +10708,7 @@ virDomainChrGetDomainPtrsInternal(virDomainDefPtr vmdef, * given type. */ void virDomainChrGetDomainPtrs(const virDomainDef *vmdef, - enum virDomainChrDeviceType type, + virDomainChrDeviceType type, const virDomainChrDef ***arrPtr, size_t *cntPtr) { @@ -11812,7 +11812,7 @@ virDomainDefParseXML(xmlDocPtr xml, goto error; } - switch ((enum virDomainFeature) val) { + switch ((virDomainFeature) val) { case VIR_DOMAIN_FEATURE_APIC: if ((tmp = virXPathString("string(./features/apic/@eoi)", ctxt))) { int eoi; @@ -11876,7 +11876,7 @@ virDomainDefParseXML(xmlDocPtr xml, ctxt->node = nodes[i]; - switch ((enum virDomainHyperv) feature) { + switch ((virDomainHyperv) feature) { case VIR_DOMAIN_HYPERV_RELAXED: case VIR_DOMAIN_HYPERV_VAPIC: if (!(tmp = virXPathString("string(./@state)", ctxt))) { @@ -13819,7 +13819,7 @@ virDomainRedirdevDefCheckABIStability(virDomainRedirdevDefPtr src, return false; } - switch ((enum virDomainRedirdevBus) src->bus) { + switch ((virDomainRedirdevBus) src->bus) { case VIR_DOMAIN_REDIRDEV_BUS_USB: if (src->source.chr.type != dst->source.chr.type) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, @@ -13926,7 +13926,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDefPtr src, /* hyperv */ if (src->features[VIR_DOMAIN_FEATURE_HYPERV] == VIR_DOMAIN_FEATURE_STATE_ON) { for (i = 0; i < VIR_DOMAIN_HYPERV_LAST; i++) { - switch ((enum virDomainHyperv) i) { + switch ((virDomainHyperv) i) { case VIR_DOMAIN_HYPERV_RELAXED: case VIR_DOMAIN_HYPERV_VAPIC: if (src->hyperv_features[i] != dst->hyperv_features[i]) { @@ -15914,7 +15914,7 @@ virDomainChrSourceDefFormat(virBufferPtr buf, } virBufferAddLit(buf, ">\n"); - switch ((enum virDomainChrType)def->type) { + switch ((virDomainChrType)def->type) { case VIR_DOMAIN_CHR_TYPE_NULL: case VIR_DOMAIN_CHR_TYPE_VC: case VIR_DOMAIN_CHR_TYPE_STDIO: @@ -16397,7 +16397,7 @@ virDomainRNGDefFormat(virBufferPtr buf, } virBufferAsprintf(buf, "backend) { + switch ((virDomainRNGBackend) def->backend) { case VIR_DOMAIN_RNG_BACKEND_RANDOM: if (def->source.file) virBufferEscapeString(buf, ">%s\n", def->source.file); @@ -16434,7 +16434,7 @@ virDomainRNGDefFree(virDomainRNGDefPtr def) if (!def) return; - switch ((enum virDomainRNGBackend) def->backend) { + switch ((virDomainRNGBackend) def->backend) { case VIR_DOMAIN_RNG_BACKEND_RANDOM: VIR_FREE(def->source.file); break; @@ -17564,13 +17564,13 @@ virDomainDefFormatInternal(virDomainDefPtr def, goto error; } - switch ((enum virDomainFeature) i) { + switch ((virDomainFeature) i) { case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_PAE: case VIR_DOMAIN_FEATURE_HAP: case VIR_DOMAIN_FEATURE_VIRIDIAN: case VIR_DOMAIN_FEATURE_PRIVNET: - switch ((enum virDomainFeatureState) def->features[i]) { + switch ((virDomainFeatureState) def->features[i]) { case VIR_DOMAIN_FEATURE_STATE_DEFAULT: break; @@ -17590,7 +17590,7 @@ virDomainDefFormatInternal(virDomainDefPtr def, break; case VIR_DOMAIN_FEATURE_PVSPINLOCK: - switch ((enum virDomainFeatureState) def->features[i]) { + switch ((virDomainFeatureState) def->features[i]) { case VIR_DOMAIN_FEATURE_STATE_LAST: case VIR_DOMAIN_FEATURE_STATE_DEFAULT: break; @@ -17624,7 +17624,7 @@ virDomainDefFormatInternal(virDomainDefPtr def, virBufferAddLit(buf, "\n"); virBufferAdjustIndent(buf, 2); for (j = 0; j < VIR_DOMAIN_HYPERV_LAST; j++) { - switch ((enum virDomainHyperv) j) { + switch ((virDomainHyperv) j) { case VIR_DOMAIN_HYPERV_RELAXED: case VIR_DOMAIN_HYPERV_VAPIC: if (def->hyperv_features[j]) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 40d96ddf56..2de807d24d 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -648,7 +648,7 @@ struct _virDomainDiskDef { }; -enum virDomainControllerType { +typedef enum { VIR_DOMAIN_CONTROLLER_TYPE_IDE, VIR_DOMAIN_CONTROLLER_TYPE_FDC, VIR_DOMAIN_CONTROLLER_TYPE_SCSI, @@ -659,7 +659,7 @@ enum virDomainControllerType { VIR_DOMAIN_CONTROLLER_TYPE_PCI, VIR_DOMAIN_CONTROLLER_TYPE_LAST -}; +} virDomainControllerType; typedef enum { @@ -671,7 +671,7 @@ typedef enum { VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST } virDomainControllerModelPCI; -enum virDomainControllerModelSCSI { +typedef enum { VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AUTO, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_BUSLOGIC, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC, @@ -682,9 +682,9 @@ enum virDomainControllerModelSCSI { VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1078, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST -}; +} virDomainControllerModelSCSI; -enum virDomainControllerModelUSB { +typedef enum { VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX3_UHCI, VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX4_UHCI, VIR_DOMAIN_CONTROLLER_MODEL_USB_EHCI, @@ -698,7 +698,7 @@ enum virDomainControllerModelUSB { VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE, VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST -}; +} virDomainControllerModelUSB; typedef struct _virDomainVirtioSerialOpts virDomainVirtioSerialOpts; typedef virDomainVirtioSerialOpts *virDomainVirtioSerialOptsPtr; @@ -729,7 +729,7 @@ struct _virDomainControllerDef { /* Two types of disk backends */ -enum virDomainFSType { +typedef enum { VIR_DOMAIN_FS_TYPE_MOUNT, /* Mounts (binds) a host dir on a guest dir */ VIR_DOMAIN_FS_TYPE_BLOCK, /* Mounts a host block dev on a guest dir */ VIR_DOMAIN_FS_TYPE_FILE, /* Loopback mounts a host file on a guest dir */ @@ -738,10 +738,10 @@ enum virDomainFSType { VIR_DOMAIN_FS_TYPE_BIND, /* Binds a guest dir to another guest dir */ VIR_DOMAIN_FS_TYPE_LAST -}; +} virDomainFSType; /* Filesystem driver type */ -enum virDomainFSDriverType { +typedef enum { VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT = 0, VIR_DOMAIN_FS_DRIVER_TYPE_PATH, VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE, @@ -749,24 +749,24 @@ enum virDomainFSDriverType { VIR_DOMAIN_FS_DRIVER_TYPE_NBD, VIR_DOMAIN_FS_DRIVER_TYPE_LAST -}; +} virDomainFSDriverType; /* Filesystem mount access mode */ -enum virDomainFSAccessMode { +typedef enum { VIR_DOMAIN_FS_ACCESSMODE_PASSTHROUGH, VIR_DOMAIN_FS_ACCESSMODE_MAPPED, VIR_DOMAIN_FS_ACCESSMODE_SQUASH, VIR_DOMAIN_FS_ACCESSMODE_LAST -}; +} virDomainFSAccessMode; /* Filesystem Write policy */ -enum virDomainFSWrpolicy { +typedef enum { VIR_DOMAIN_FS_WRPOLICY_DEFAULT = 0, VIR_DOMAIN_FS_WRPOLICY_IMMEDIATE, VIR_DOMAIN_FS_WRPOLICY_LAST -}; +} virDomainFSWrpolicy; /* Allow 2 MB ram usage */ # define VIR_DOMAIN_FS_RAM_DEFAULT_USAGE (1024 * 2) @@ -788,7 +788,7 @@ struct _virDomainFSDef { /* network config types */ -enum virDomainNetType { +typedef enum { VIR_DOMAIN_NET_TYPE_USER, VIR_DOMAIN_NET_TYPE_ETHERNET, VIR_DOMAIN_NET_TYPE_SERVER, @@ -801,34 +801,34 @@ enum virDomainNetType { VIR_DOMAIN_NET_TYPE_HOSTDEV, VIR_DOMAIN_NET_TYPE_LAST -}; +} virDomainNetType; /* the backend driver used for virtio interfaces */ -enum virDomainNetBackendType { +typedef enum { VIR_DOMAIN_NET_BACKEND_TYPE_DEFAULT, /* prefer kernel, fall back to user */ VIR_DOMAIN_NET_BACKEND_TYPE_QEMU, /* userland */ VIR_DOMAIN_NET_BACKEND_TYPE_VHOST, /* kernel */ VIR_DOMAIN_NET_BACKEND_TYPE_LAST -}; +} virDomainNetBackendType; /* the TX algorithm used for virtio interfaces */ -enum virDomainNetVirtioTxModeType { +typedef enum { VIR_DOMAIN_NET_VIRTIO_TX_MODE_DEFAULT, /* default for this version of qemu */ VIR_DOMAIN_NET_VIRTIO_TX_MODE_IOTHREAD, VIR_DOMAIN_NET_VIRTIO_TX_MODE_TIMER, VIR_DOMAIN_NET_VIRTIO_TX_MODE_LAST -}; +} virDomainNetVirtioTxModeType; /* link interface states */ -enum virDomainNetInterfaceLinkState { +typedef enum { VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DEFAULT = 0, /* Default link state (up) */ VIR_DOMAIN_NET_INTERFACE_LINK_STATE_UP, /* Link is up. ("cable" connected) */ VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DOWN , /* Link is down. ("cable" disconnected) */ VIR_DOMAIN_NET_INTERFACE_LINK_STATE_LAST -}; +} virDomainNetInterfaceLinkState; /* Config that was actually used to bring up interface, after * resolving network reference. This is private data, only used within @@ -859,13 +859,13 @@ struct _virDomainActualNetDef { /* Stores the virtual network interface configuration */ struct _virDomainNetDef { - enum virDomainNetType type; + virDomainNetType type; virMacAddr mac; char *model; union { struct { - enum virDomainNetBackendType name; /* which driver backend to use */ - enum virDomainNetVirtioTxModeType txmode; + virDomainNetBackendType name; /* which driver backend to use */ + virDomainNetVirtioTxModeType txmode; virDomainIoEventFd ioeventfd; virDomainVirtioEventIdx event_idx; unsigned int queues; /* Multiqueue virtio-net */ @@ -928,31 +928,31 @@ struct _virDomainNetDef { * by libvirt, and cannot be used for a persistent network name. */ # define VIR_NET_GENERATED_PREFIX "vnet" -enum virDomainChrDeviceType { +typedef enum { VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL = 0, VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL, VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE, VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL, VIR_DOMAIN_CHR_DEVICE_TYPE_LAST -}; +} virDomainChrDeviceType; -enum virDomainChrSerialTargetType { +typedef enum { VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA = 0, VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB, VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST -}; +} virDomainChrSerialTargetType; -enum virDomainChrChannelTargetType { +typedef enum { VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_NONE = 0, VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD, VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO, VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST -}; +} virDomainChrChannelTargetType; -enum virDomainChrConsoleTargetType { +typedef enum { VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE = 0, VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL, VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_XEN, @@ -964,9 +964,9 @@ enum virDomainChrConsoleTargetType { VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM, VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_LAST -}; +} virDomainChrConsoleTargetType; -enum virDomainChrType { +typedef enum { VIR_DOMAIN_CHR_TYPE_NULL, VIR_DOMAIN_CHR_TYPE_VC, VIR_DOMAIN_CHR_TYPE_PTY, @@ -982,24 +982,24 @@ enum virDomainChrType { VIR_DOMAIN_CHR_TYPE_NMDM, VIR_DOMAIN_CHR_TYPE_LAST -}; +} virDomainChrType; -enum virDomainChrTcpProtocol { +typedef enum { VIR_DOMAIN_CHR_TCP_PROTOCOL_RAW, VIR_DOMAIN_CHR_TCP_PROTOCOL_TELNET, VIR_DOMAIN_CHR_TCP_PROTOCOL_TELNETS, /* secure telnet */ VIR_DOMAIN_CHR_TCP_PROTOCOL_TLS, VIR_DOMAIN_CHR_TCP_PROTOCOL_LAST -}; +} virDomainChrTcpProtocol; -enum virDomainChrSpicevmcName { +typedef enum { VIR_DOMAIN_CHR_SPICEVMC_VDAGENT, VIR_DOMAIN_CHR_SPICEVMC_SMARTCARD, VIR_DOMAIN_CHR_SPICEVMC_USBREDIR, VIR_DOMAIN_CHR_SPICEVMC_LAST -}; +} virDomainChrSpicevmcName; /* The host side information for a character device. */ typedef struct _virDomainChrSourceDef virDomainChrSourceDef; @@ -1058,13 +1058,13 @@ struct _virDomainChrDef { virSecurityDeviceLabelDefPtr *seclabels; }; -enum virDomainSmartcardType { +typedef enum { VIR_DOMAIN_SMARTCARD_TYPE_HOST, VIR_DOMAIN_SMARTCARD_TYPE_HOST_CERTIFICATES, VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH, VIR_DOMAIN_SMARTCARD_TYPE_LAST -}; +} virDomainSmartcardType; # define VIR_DOMAIN_SMARTCARD_NUM_CERTIFICATES 3 # define VIR_DOMAIN_SMARTCARD_DEFAULT_DATABASE "/etc/pki/nssdb" @@ -1088,26 +1088,26 @@ struct _virDomainHubDef { virDomainDeviceInfo info; }; -enum virDomainTPMModel { +typedef enum { VIR_DOMAIN_TPM_MODEL_TIS, VIR_DOMAIN_TPM_MODEL_LAST -}; +} virDomainTPMModel; -enum virDomainTPMBackendType { +typedef enum { VIR_DOMAIN_TPM_TYPE_PASSTHROUGH, VIR_DOMAIN_TPM_TYPE_LAST -}; +} virDomainTPMBackendType; # define VIR_DOMAIN_TPM_DEFAULT_DEVICE "/dev/tpm0" typedef struct _virDomainTPMDef virDomainTPMDef; typedef virDomainTPMDef *virDomainTPMDefPtr; struct _virDomainTPMDef { - enum virDomainTPMBackendType type; + virDomainTPMBackendType type; virDomainDeviceInfo info; - enum virDomainTPMModel model; + virDomainTPMModel model; union { struct { virDomainChrSourceDef source; @@ -1115,21 +1115,21 @@ struct _virDomainTPMDef { } data; }; -enum virDomainInputType { +typedef enum { VIR_DOMAIN_INPUT_TYPE_MOUSE, VIR_DOMAIN_INPUT_TYPE_TABLET, VIR_DOMAIN_INPUT_TYPE_KBD, VIR_DOMAIN_INPUT_TYPE_LAST -}; +} virDomainInputType; -enum virDomainInputBus { +typedef enum { VIR_DOMAIN_INPUT_BUS_PS2, VIR_DOMAIN_INPUT_BUS_USB, VIR_DOMAIN_INPUT_BUS_XEN, VIR_DOMAIN_INPUT_BUS_LAST -}; +} virDomainInputBus; struct _virDomainInputDef { int type; @@ -1137,14 +1137,14 @@ struct _virDomainInputDef { virDomainDeviceInfo info; }; -enum virDomainSoundCodecType { +typedef enum { VIR_DOMAIN_SOUND_CODEC_TYPE_DUPLEX, VIR_DOMAIN_SOUND_CODEC_TYPE_MICRO, VIR_DOMAIN_SOUND_CODEC_TYPE_LAST -}; +} virDomainSoundCodecType; -enum virDomainSoundModel { +typedef enum { VIR_DOMAIN_SOUND_MODEL_SB16, VIR_DOMAIN_SOUND_MODEL_ES1370, VIR_DOMAIN_SOUND_MODEL_PCSPK, @@ -1153,7 +1153,7 @@ enum virDomainSoundModel { VIR_DOMAIN_SOUND_MODEL_ICH9, VIR_DOMAIN_SOUND_MODEL_LAST -}; +} virDomainSoundModel; struct _virDomainSoundCodecDef { int type; @@ -1168,14 +1168,14 @@ struct _virDomainSoundDef { virDomainSoundCodecDefPtr *codecs; }; -enum virDomainWatchdogModel { +typedef enum { VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB, VIR_DOMAIN_WATCHDOG_MODEL_IB700, VIR_DOMAIN_WATCHDOG_MODEL_LAST -}; +} virDomainWatchdogModel; -enum virDomainWatchdogAction { +typedef enum { VIR_DOMAIN_WATCHDOG_ACTION_RESET, VIR_DOMAIN_WATCHDOG_ACTION_SHUTDOWN, VIR_DOMAIN_WATCHDOG_ACTION_POWEROFF, @@ -1184,7 +1184,7 @@ enum virDomainWatchdogAction { VIR_DOMAIN_WATCHDOG_ACTION_NONE, VIR_DOMAIN_WATCHDOG_ACTION_LAST -}; +} virDomainWatchdogAction; struct _virDomainWatchdogDef { int model; @@ -1193,7 +1193,7 @@ struct _virDomainWatchdogDef { }; -enum virDomainVideoType { +typedef enum { VIR_DOMAIN_VIDEO_TYPE_VGA, VIR_DOMAIN_VIDEO_TYPE_CIRRUS, VIR_DOMAIN_VIDEO_TYPE_VMVGA, @@ -1202,7 +1202,7 @@ enum virDomainVideoType { VIR_DOMAIN_VIDEO_TYPE_QXL, VIR_DOMAIN_VIDEO_TYPE_LAST -}; +} virDomainVideoType; typedef struct _virDomainVideoAccelDef virDomainVideoAccelDef; @@ -1224,7 +1224,7 @@ struct _virDomainVideoDef { }; /* graphics console modes */ -enum virDomainGraphicsType { +typedef enum { VIR_DOMAIN_GRAPHICS_TYPE_SDL, VIR_DOMAIN_GRAPHICS_TYPE_VNC, VIR_DOMAIN_GRAPHICS_TYPE_RDP, @@ -1232,25 +1232,25 @@ enum virDomainGraphicsType { VIR_DOMAIN_GRAPHICS_TYPE_SPICE, VIR_DOMAIN_GRAPHICS_TYPE_LAST -}; +} virDomainGraphicsType; -enum virDomainGraphicsVNCSharePolicy { +typedef enum { VIR_DOMAIN_GRAPHICS_VNC_SHARE_DEFAULT = 0, VIR_DOMAIN_GRAPHICS_VNC_SHARE_ALLOW_EXCLUSIVE, VIR_DOMAIN_GRAPHICS_VNC_SHARE_FORCE_SHARED, VIR_DOMAIN_GRAPHICS_VNC_SHARE_IGNORE, VIR_DOMAIN_GRAPHICS_VNC_SHARE_LAST -}; +} virDomainGraphicsVNCSharePolicy; -enum virDomainGraphicsAuthConnectedType { +typedef enum { VIR_DOMAIN_GRAPHICS_AUTH_CONNECTED_DEFAULT = 0, VIR_DOMAIN_GRAPHICS_AUTH_CONNECTED_FAIL, VIR_DOMAIN_GRAPHICS_AUTH_CONNECTED_DISCONNECT, VIR_DOMAIN_GRAPHICS_AUTH_CONNECTED_KEEP, VIR_DOMAIN_GRAPHICS_AUTH_CONNECTED_LAST -}; +} virDomainGraphicsAuthConnectedType; typedef struct _virDomainGraphicsAuthDef virDomainGraphicsAuthDef; typedef virDomainGraphicsAuthDef *virDomainGraphicsAuthDefPtr; @@ -1261,7 +1261,7 @@ struct _virDomainGraphicsAuthDef { int connected; /* action if connected */ }; -enum virDomainGraphicsSpiceChannelName { +typedef enum { VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MAIN, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_DISPLAY, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_INPUT, @@ -1272,17 +1272,17 @@ enum virDomainGraphicsSpiceChannelName { VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_USBREDIR, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST -}; +} virDomainGraphicsSpiceChannelName; -enum virDomainGraphicsSpiceChannelMode { +typedef enum { VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_ANY, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_SECURE, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_INSECURE, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_LAST -}; +} virDomainGraphicsSpiceChannelMode; -enum virDomainGraphicsSpiceImageCompression { +typedef enum { VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_DEFAULT = 0, VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_AUTO_GLZ, VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_AUTO_LZ, @@ -1292,80 +1292,80 @@ enum virDomainGraphicsSpiceImageCompression { VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_OFF, VIR_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_LAST -}; +} virDomainGraphicsSpiceImageCompression; -enum virDomainGraphicsSpiceJpegCompression { +typedef enum { VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_DEFAULT = 0, VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_AUTO, VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_NEVER, VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_ALWAYS, VIR_DOMAIN_GRAPHICS_SPICE_JPEG_COMPRESSION_LAST -}; +} virDomainGraphicsSpiceJpegCompression; -enum virDomainGraphicsSpiceZlibCompression { +typedef enum { VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_DEFAULT = 0, VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_AUTO, VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_NEVER, VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_ALWAYS, VIR_DOMAIN_GRAPHICS_SPICE_ZLIB_COMPRESSION_LAST -}; +} virDomainGraphicsSpiceZlibCompression; -enum virDomainGraphicsSpicePlaybackCompression { +typedef enum { VIR_DOMAIN_GRAPHICS_SPICE_PLAYBACK_COMPRESSION_DEFAULT = 0, VIR_DOMAIN_GRAPHICS_SPICE_PLAYBACK_COMPRESSION_ON, VIR_DOMAIN_GRAPHICS_SPICE_PLAYBACK_COMPRESSION_OFF, VIR_DOMAIN_GRAPHICS_SPICE_PLAYBACK_COMPRESSION_LAST -}; +} virDomainGraphicsSpicePlaybackCompression; -enum virDomainGraphicsSpiceMouseMode { +typedef enum { VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_DEFAULT = 0, VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_SERVER, VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_CLIENT, VIR_DOMAIN_GRAPHICS_SPICE_MOUSE_MODE_LAST -}; +} virDomainGraphicsSpiceMouseMode; -enum virDomainGraphicsSpiceStreamingMode { +typedef enum { VIR_DOMAIN_GRAPHICS_SPICE_STREAMING_MODE_DEFAULT = 0, VIR_DOMAIN_GRAPHICS_SPICE_STREAMING_MODE_FILTER, VIR_DOMAIN_GRAPHICS_SPICE_STREAMING_MODE_ALL, VIR_DOMAIN_GRAPHICS_SPICE_STREAMING_MODE_OFF, VIR_DOMAIN_GRAPHICS_SPICE_STREAMING_MODE_LAST -}; +} virDomainGraphicsSpiceStreamingMode; -enum virDomainGraphicsSpiceClipboardCopypaste { +typedef enum { VIR_DOMAIN_GRAPHICS_SPICE_CLIPBOARD_COPYPASTE_DEFAULT = 0, VIR_DOMAIN_GRAPHICS_SPICE_CLIPBOARD_COPYPASTE_YES, VIR_DOMAIN_GRAPHICS_SPICE_CLIPBOARD_COPYPASTE_NO, VIR_DOMAIN_GRAPHICS_SPICE_CLIPBOARD_COPYPASTE_LAST -}; +} virDomainGraphicsSpiceClipboardCopypaste; -enum virDomainGraphicsSpiceAgentFileTransfer { +typedef enum { VIR_DOMAIN_GRAPHICS_SPICE_AGENT_FILE_TRANSFER_DEFAULT = 0, VIR_DOMAIN_GRAPHICS_SPICE_AGENT_FILE_TRANSFER_YES, VIR_DOMAIN_GRAPHICS_SPICE_AGENT_FILE_TRANSFER_NO, VIR_DOMAIN_GRAPHICS_SPICE_AGENT_FILE_TRANSFER_LAST -}; +} virDomainGraphicsSpiceAgentFileTransfer; -enum virDomainGraphicsListenType { +typedef enum { VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE = 0, VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS, VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK, VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_LAST -}; +} virDomainGraphicsListenType; -enum virDomainHubType { +typedef enum { VIR_DOMAIN_HUB_TYPE_USB, VIR_DOMAIN_HUB_TYPE_LAST -}; +} virDomainHubType; typedef struct _virDomainGraphicsListenDef virDomainGraphicsListenDef; typedef virDomainGraphicsListenDef *virDomainGraphicsListenDefPtr; @@ -1433,11 +1433,11 @@ struct _virDomainGraphicsDef { virDomainGraphicsListenDefPtr listens; }; -enum virDomainRedirdevBus { +typedef enum { VIR_DOMAIN_REDIRDEV_BUS_USB, VIR_DOMAIN_REDIRDEV_BUS_LAST -}; +} virDomainRedirdevBus; struct _virDomainRedirdevDef { int bus; /* enum virDomainRedirdevBus */ @@ -1462,13 +1462,13 @@ struct _virDomainRedirFilterDef { virDomainRedirFilterUSBDevDefPtr *usbdevs; }; -enum virDomainMemDump { +typedef enum { VIR_DOMAIN_MEM_DUMP_DEFAULT = 0, VIR_DOMAIN_MEM_DUMP_ON, VIR_DOMAIN_MEM_DUMP_OFF, VIR_DOMAIN_MEM_DUMP_LAST, -}; +} virDomainMemDump; enum { VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO, @@ -1488,36 +1488,36 @@ struct _virDomainNVRAMDef { virDomainDeviceInfo info; }; -enum virDomainSmbiosMode { +typedef enum { VIR_DOMAIN_SMBIOS_NONE = 0, VIR_DOMAIN_SMBIOS_EMULATE, VIR_DOMAIN_SMBIOS_HOST, VIR_DOMAIN_SMBIOS_SYSINFO, VIR_DOMAIN_SMBIOS_LAST -}; +} virDomainSmbiosMode; # define VIR_DOMAIN_MAX_BOOT_DEVS 4 -enum virDomainBootOrder { +typedef enum { VIR_DOMAIN_BOOT_FLOPPY, VIR_DOMAIN_BOOT_CDROM, VIR_DOMAIN_BOOT_DISK, VIR_DOMAIN_BOOT_NET, VIR_DOMAIN_BOOT_LAST -}; +} virDomainBootOrder; -enum virDomainBootMenu { +typedef enum { VIR_DOMAIN_BOOT_MENU_DEFAULT = 0, VIR_DOMAIN_BOOT_MENU_ENABLED, VIR_DOMAIN_BOOT_MENU_DISABLED, VIR_DOMAIN_BOOT_MENU_LAST -}; +} virDomainBootMenu; -enum virDomainFeature { +typedef enum { VIR_DOMAIN_FEATURE_ACPI, VIR_DOMAIN_FEATURE_APIC, VIR_DOMAIN_FEATURE_PAE, @@ -1528,34 +1528,34 @@ enum virDomainFeature { VIR_DOMAIN_FEATURE_PVSPINLOCK, VIR_DOMAIN_FEATURE_LAST -}; +} virDomainFeature; -enum virDomainFeatureState { +typedef enum { VIR_DOMAIN_FEATURE_STATE_DEFAULT = 0, VIR_DOMAIN_FEATURE_STATE_ON, VIR_DOMAIN_FEATURE_STATE_OFF, VIR_DOMAIN_FEATURE_STATE_LAST -}; +} virDomainFeatureState; -enum virDomainHyperv { +typedef enum { VIR_DOMAIN_HYPERV_RELAXED = 0, VIR_DOMAIN_HYPERV_VAPIC, VIR_DOMAIN_HYPERV_SPINLOCKS, VIR_DOMAIN_HYPERV_LAST -}; +} virDomainHyperv; -enum virDomainLifecycleAction { +typedef enum { VIR_DOMAIN_LIFECYCLE_DESTROY, VIR_DOMAIN_LIFECYCLE_RESTART, VIR_DOMAIN_LIFECYCLE_RESTART_RENAME, VIR_DOMAIN_LIFECYCLE_PRESERVE, VIR_DOMAIN_LIFECYCLE_LAST -}; +} virDomainLifecycleAction; -enum virDomainLifecycleCrashAction { +typedef enum { VIR_DOMAIN_LIFECYCLE_CRASH_DESTROY, VIR_DOMAIN_LIFECYCLE_CRASH_RESTART, VIR_DOMAIN_LIFECYCLE_CRASH_RESTART_RENAME, @@ -1564,7 +1564,7 @@ enum virDomainLifecycleCrashAction { VIR_DOMAIN_LIFECYCLE_CRASH_COREDUMP_RESTART, VIR_DOMAIN_LIFECYCLE_CRASH_LAST -}; +} virDomainLifecycleCrashAction; typedef enum { VIR_DOMAIN_LOCK_FAILURE_DEFAULT, @@ -1578,19 +1578,19 @@ typedef enum { VIR_ENUM_DECL(virDomainLockFailure) -enum virDomainPMState { +typedef enum { VIR_DOMAIN_PM_STATE_DEFAULT = 0, VIR_DOMAIN_PM_STATE_ENABLED, VIR_DOMAIN_PM_STATE_DISABLED, VIR_DOMAIN_PM_STATE_LAST -}; +} virDomainPMState; -enum virDomainBIOSUseserial { +typedef enum { VIR_DOMAIN_BIOS_USESERIAL_DEFAULT = 0, VIR_DOMAIN_BIOS_USESERIAL_YES, VIR_DOMAIN_BIOS_USESERIAL_NO -}; +} virDomainBIOSUseserial; typedef struct _virDomainBIOSDef virDomainBIOSDef; typedef virDomainBIOSDef *virDomainBIOSDefPtr; @@ -1627,7 +1627,7 @@ struct _virDomainOSDef { virDomainBIOSDef bios; }; -enum virDomainTimerNameType { +typedef enum { VIR_DOMAIN_TIMER_NAME_PLATFORM = 0, VIR_DOMAIN_TIMER_NAME_PIT, VIR_DOMAIN_TIMER_NAME_RTC, @@ -1637,26 +1637,26 @@ enum virDomainTimerNameType { VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK, VIR_DOMAIN_TIMER_NAME_LAST -}; +} virDomainTimerNameType; -enum virDomainTimerTrackType { +typedef enum { VIR_DOMAIN_TIMER_TRACK_BOOT = 0, VIR_DOMAIN_TIMER_TRACK_GUEST, VIR_DOMAIN_TIMER_TRACK_WALL, VIR_DOMAIN_TIMER_TRACK_LAST -}; +} virDomainTimerTrackType; -enum virDomainTimerTickpolicyType { +typedef enum { VIR_DOMAIN_TIMER_TICKPOLICY_DELAY = 0, VIR_DOMAIN_TIMER_TICKPOLICY_CATCHUP, VIR_DOMAIN_TIMER_TICKPOLICY_MERGE, VIR_DOMAIN_TIMER_TICKPOLICY_DISCARD, VIR_DOMAIN_TIMER_TICKPOLICY_LAST -}; +} virDomainTimerTickpolicyType; -enum virDomainTimerModeType { +typedef enum { VIR_DOMAIN_TIMER_MODE_AUTO = 0, VIR_DOMAIN_TIMER_MODE_NATIVE, VIR_DOMAIN_TIMER_MODE_EMULATE, @@ -1664,14 +1664,14 @@ enum virDomainTimerModeType { VIR_DOMAIN_TIMER_MODE_SMPSAFE, VIR_DOMAIN_TIMER_MODE_LAST -}; +} virDomainTimerModeType; -enum virDomainCpuPlacementMode { +typedef enum { VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC = 0, VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO, VIR_DOMAIN_CPU_PLACEMENT_MODE_LAST -}; +} virDomainCpuPlacementMode; typedef struct _virDomainTimerCatchupDef virDomainTimerCatchupDef; typedef virDomainTimerCatchupDef *virDomainTimerCatchupDefPtr; @@ -1698,21 +1698,21 @@ struct _virDomainTimerDef { int mode; /* auto|native|emulate|paravirt */ }; -enum virDomainClockOffsetType { +typedef enum { VIR_DOMAIN_CLOCK_OFFSET_UTC = 0, VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME = 1, VIR_DOMAIN_CLOCK_OFFSET_VARIABLE = 2, VIR_DOMAIN_CLOCK_OFFSET_TIMEZONE = 3, VIR_DOMAIN_CLOCK_OFFSET_LAST -}; +} virDomainClockOffsetType; -enum virDomainClockBasis { +typedef enum { VIR_DOMAIN_CLOCK_BASIS_UTC = 0, VIR_DOMAIN_CLOCK_BASIS_LOCALTIME = 1, VIR_DOMAIN_CLOCK_BASIS_LAST -}; +} virDomainClockBasis; typedef struct _virDomainClockDef virDomainClockDef; typedef virDomainClockDef *virDomainClockDefPtr; @@ -1779,19 +1779,19 @@ struct _virBlkioDevice { unsigned long long wbps; }; -enum virDomainRNGModel { +typedef enum { VIR_DOMAIN_RNG_MODEL_VIRTIO, VIR_DOMAIN_RNG_MODEL_LAST -}; +} virDomainRNGModel; -enum virDomainRNGBackend { +typedef enum { VIR_DOMAIN_RNG_BACKEND_RANDOM, VIR_DOMAIN_RNG_BACKEND_EGD, /* VIR_DOMAIN_RNG_BACKEND_POOL, */ VIR_DOMAIN_RNG_BACKEND_LAST -}; +} virDomainRNGBackend; struct _virDomainRNGDef { int model; @@ -1989,7 +1989,7 @@ struct _virDomainDef { xmlNodePtr metadata; }; -enum virDomainTaintFlags { +typedef enum { VIR_DOMAIN_TAINT_CUSTOM_ARGV, /* Custom ARGV passthrough from XML */ VIR_DOMAIN_TAINT_CUSTOM_MONITOR, /* Custom monitor commands issued */ VIR_DOMAIN_TAINT_HIGH_PRIVILEGES, /* Running with undesirably high privileges */ @@ -2000,7 +2000,7 @@ enum virDomainTaintFlags { VIR_DOMAIN_TAINT_HOOK, /* Domain (possibly) changed via hook script */ VIR_DOMAIN_TAINT_LAST -}; +} virDomainTaintFlags; /* Guest VM runtime state */ typedef struct _virDomainStateReason virDomainStateReason; @@ -2123,7 +2123,7 @@ virDomainObjPtr virDomainObjListFindByName(virDomainObjListPtr doms, const char *name); bool virDomainObjTaint(virDomainObjPtr obj, - enum virDomainTaintFlags taint); + virDomainTaintFlags taint); void virDomainPanicDefFree(virDomainPanicDefPtr panic); void virDomainResourceDefFree(virDomainResourceDefPtr resource); @@ -2396,7 +2396,7 @@ virDomainLeaseRemove(virDomainDefPtr def, void virDomainChrGetDomainPtrs(const virDomainDef *vmdef, - enum virDomainChrDeviceType type, + virDomainChrDeviceType type, const virDomainChrDef ***arrPtr, size_t *cntPtr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 80d52800fe..9743c85890 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -526,7 +526,7 @@ libxlDomainShutdownThread(void *opaque) dom_event = virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED, VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN); - switch ((enum virDomainLifecycleAction) vm->def->onPoweroff) { + switch ((virDomainLifecycleAction) vm->def->onPoweroff) { case VIR_DOMAIN_LIFECYCLE_DESTROY: reason = VIR_DOMAIN_SHUTOFF_SHUTDOWN; goto destroy; @@ -541,7 +541,7 @@ libxlDomainShutdownThread(void *opaque) dom_event = virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED, VIR_DOMAIN_EVENT_STOPPED_CRASHED); - switch ((enum virDomainLifecycleCrashAction) vm->def->onCrash) { + switch ((virDomainLifecycleCrashAction) vm->def->onCrash) { case VIR_DOMAIN_LIFECYCLE_CRASH_DESTROY: reason = VIR_DOMAIN_SHUTOFF_CRASHED; goto destroy; @@ -562,7 +562,7 @@ libxlDomainShutdownThread(void *opaque) dom_event = virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED, VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN); - switch ((enum virDomainLifecycleAction) vm->def->onReboot) { + switch ((virDomainLifecycleAction) vm->def->onReboot) { case VIR_DOMAIN_LIFECYCLE_DESTROY: reason = VIR_DOMAIN_SHUTOFF_SHUTDOWN; goto destroy; diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index eb7f52171a..51f01fb32c 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -3503,7 +3503,7 @@ networkAllocateActualDevice(virDomainDefPtr dom, virDomainNetDefPtr iface) { virNetworkDriverStatePtr driver = driverState; - enum virDomainNetType actualType = iface->type; + virDomainNetType actualType = iface->type; virNetworkObjPtr network = NULL; virNetworkDefPtr netdef = NULL; virNetDevBandwidthPtr bandwidth = NULL; @@ -3902,7 +3902,7 @@ networkNotifyActualDevice(virDomainDefPtr dom, virDomainNetDefPtr iface) { virNetworkDriverStatePtr driver = driverState; - enum virDomainNetType actualType = virDomainNetGetActualType(iface); + virDomainNetType actualType = virDomainNetGetActualType(iface); virNetworkObjPtr network; virNetworkDefPtr netdef; virNetworkForwardIfDefPtr dev = NULL; @@ -4093,7 +4093,7 @@ networkReleaseActualDevice(virDomainDefPtr dom, virDomainNetDefPtr iface) { virNetworkDriverStatePtr driver = driverState; - enum virDomainNetType actualType = virDomainNetGetActualType(iface); + virDomainNetType actualType = virDomainNetGetActualType(iface); virNetworkObjPtr network; virNetworkDefPtr netdef; virNetworkForwardIfDefPtr dev = NULL; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2e3dced4b2..e6acced20e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -933,7 +933,7 @@ qemuAssignDeviceChrAlias(virDomainDefPtr def, { const char *prefix = NULL; - switch ((enum virDomainChrDeviceType) chr->deviceType) { + switch ((virDomainChrDeviceType) chr->deviceType) { case VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL: prefix = "parallel"; break; @@ -4522,7 +4522,7 @@ qemuBuildHostNetStr(virDomainNetDefPtr net, { bool is_tap = false; virBuffer buf = VIR_BUFFER_INITIALIZER; - enum virDomainNetType netType = virDomainNetGetActualType(net); + virDomainNetType netType = virDomainNetGetActualType(net); virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver); size_t i; @@ -5495,7 +5495,7 @@ qemuBuildChrArgStr(virDomainChrSourceDefPtr dev, const char *prefix) if (prefix) virBufferAdd(&buf, prefix, strlen(prefix)); - switch ((enum virDomainChrType)dev->type) { + switch ((virDomainChrType)dev->type) { case VIR_DOMAIN_CHR_TYPE_NULL: virBufferAddLit(&buf, "null"); break; @@ -5704,7 +5704,7 @@ qemuBuildRNGBackendArgs(virCommandPtr cmd, char *backend = NULL; int ret = -1; - switch ((enum virDomainRNGBackend) dev->backend) { + switch ((virDomainRNGBackend) dev->backend) { case VIR_DOMAIN_RNG_BACKEND_RANDOM: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_RNG_RANDOM)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -6297,7 +6297,7 @@ qemuBuildCpuArgStr(virQEMUDriverPtr driver, } for (i = 0; i < VIR_DOMAIN_HYPERV_LAST; i++) { - switch ((enum virDomainHyperv) i) { + switch ((virDomainHyperv) i) { case VIR_DOMAIN_HYPERV_RELAXED: case VIR_DOMAIN_HYPERV_VAPIC: if (def->hyperv_features[i] == VIR_DOMAIN_FEATURE_STATE_ON) @@ -6957,7 +6957,7 @@ qemuBuildGraphicsCommandLine(virQEMUDriverConfigPtr cfg, virQEMUCapsPtr qemuCaps, virDomainGraphicsDefPtr graphics) { - switch ((enum virDomainGraphicsType) graphics->type) { + switch ((virDomainGraphicsType) graphics->type) { case VIR_DOMAIN_GRAPHICS_TYPE_SDL: if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_0_10) && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_SDL)) { @@ -7573,7 +7573,7 @@ qemuBuildCommandLine(virConnectPtr conn, } for (i = 0; i < def->clock.ntimers; i++) { - switch ((enum virDomainTimerNameType) def->clock.timers[i]->name) { + switch ((virDomainTimerNameType) def->clock.timers[i]->name) { case VIR_DOMAIN_TIMER_NAME_PLATFORM: case VIR_DOMAIN_TIMER_NAME_TSC: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, @@ -9333,7 +9333,7 @@ qemuBuildChannelChrDeviceStr(char **deviceStr, char *addr = NULL; int port; - switch ((enum virDomainChrChannelTargetType) chr->targetType) { + switch ((virDomainChrChannelTargetType) chr->targetType) { case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD: addr = virSocketAddrFormat(chr->target.addr); @@ -9372,7 +9372,7 @@ qemuBuildConsoleChrDeviceStr(char **deviceStr, { int ret = -1; - switch ((enum virDomainChrConsoleTargetType) chr->targetType) { + switch ((virDomainChrConsoleTargetType) chr->targetType) { case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLP: case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM: if (!(*deviceStr = qemuBuildSclpDevStr(chr))) @@ -9407,7 +9407,7 @@ qemuBuildChrDeviceStr(char **deviceStr, { int ret = -1; - switch ((enum virDomainChrDeviceType) chr->deviceType) { + switch ((virDomainChrDeviceType) chr->deviceType) { case VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL: ret = qemuBuildSerialChrDeviceStr(deviceStr, vmdef, chr, qemuCaps, vmdef->os.arch, @@ -10552,7 +10552,7 @@ qemuParseCommandLineCPU(virDomainDefPtr dom, goto cleanup; } - switch ((enum virDomainHyperv) f) { + switch ((virDomainHyperv) f) { case VIR_DOMAIN_HYPERV_RELAXED: case VIR_DOMAIN_HYPERV_VAPIC: if (value) { diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 8f14259e9e..29177212f0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1642,7 +1642,7 @@ qemuDomainDefFormatLive(virQEMUDriverPtr driver, void qemuDomainObjTaint(virQEMUDriverPtr driver, virDomainObjPtr obj, - enum virDomainTaintFlags taint, + virDomainTaintFlags taint, int logFD) { virErrorPtr orig_err = NULL; diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index d7b010c1a5..8615f748e4 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -278,7 +278,7 @@ char *qemuDomainDefFormatLive(virQEMUDriverPtr driver, void qemuDomainObjTaint(virQEMUDriverPtr driver, virDomainObjPtr obj, - enum virDomainTaintFlags taint, + virDomainTaintFlags taint, int logFD); void qemuDomainObjCheckTaint(virQEMUDriverPtr driver, diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 45c57fb79a..0acf18a260 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2298,7 +2298,7 @@ qemuDomainChangeGraphics(virQEMUDriverPtr driver, goto cleanup; } - switch ((enum virDomainGraphicsListenType) newlisten->type) { + switch ((virDomainGraphicsListenType) newlisten->type) { case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS: if (STRNEQ_NULLABLE(newlisten->address, oldlisten->address)) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 912bea1824..80d7b9d346 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1530,7 +1530,7 @@ int qemuMonitorGetCPUInfo(qemuMonitorPtr mon, int qemuMonitorSetLink(qemuMonitorPtr mon, const char *name, - enum virDomainNetInterfaceLinkState state) + virDomainNetInterfaceLinkState state) { int ret; VIR_DEBUG("mon=%p, name=%p:%s, state=%u", mon, name, name, state); diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index de724bfc0a..31b320498c 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -220,7 +220,7 @@ int qemuMonitorSetCapabilities(qemuMonitorPtr mon); int qemuMonitorSetLink(qemuMonitorPtr mon, const char *name, - enum virDomainNetInterfaceLinkState state); + virDomainNetInterfaceLinkState state); /* These APIs are for use by the internal Text/JSON monitor impl code only */ char *qemuMonitorNextCommandID(qemuMonitorPtr mon); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 914f3ef1e7..8a81a5e1bf 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -1162,7 +1162,7 @@ int qemuMonitorJSONSystemPowerdown(qemuMonitorPtr mon) int qemuMonitorJSONSetLink(qemuMonitorPtr mon, const char *name, - enum virDomainNetInterfaceLinkState state) + virDomainNetInterfaceLinkState state) { int ret; @@ -5365,7 +5365,7 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID, goto no_memory; } - switch ((enum virDomainChrType) chr->type) { + switch ((virDomainChrType) chr->type) { case VIR_DOMAIN_CHR_TYPE_NULL: case VIR_DOMAIN_CHR_TYPE_VC: backend_type = "null"; diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 5dda0babd8..e29158e947 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -291,7 +291,7 @@ int qemuMonitorJSONBlockJob(qemuMonitorPtr mon, int qemuMonitorJSONSetLink(qemuMonitorPtr mon, const char *name, - enum virDomainNetInterfaceLinkState state); + virDomainNetInterfaceLinkState state); int qemuMonitorJSONOpenGraphics(qemuMonitorPtr mon, const char *protocol, diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index 008795c93e..fea484d730 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -450,7 +450,7 @@ int qemuMonitorTextSystemPowerdown(qemuMonitorPtr mon) int qemuMonitorTextSetLink(qemuMonitorPtr mon, const char *name, - enum virDomainNetInterfaceLinkState state) + virDomainNetInterfaceLinkState state) { char *info = NULL; char *cmd = NULL; diff --git a/src/qemu/qemu_monitor_text.h b/src/qemu/qemu_monitor_text.h index 5218a8bf94..49d4b882cb 100644 --- a/src/qemu/qemu_monitor_text.h +++ b/src/qemu/qemu_monitor_text.h @@ -228,7 +228,7 @@ int qemuMonitorTextScreendump(qemuMonitorPtr mon, const char *file); int qemuMonitorTextSetLink(qemuMonitorPtr mon, const char *name, - enum virDomainNetInterfaceLinkState state); + virDomainNetInterfaceLinkState state); int qemuMonitorTextOpenGraphics(qemuMonitorPtr mon, const char *protocol, diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 73bd83aa6c..015b6994b0 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -722,7 +722,7 @@ virSecurityDACSetChardevLabel(virSecurityManagerPtr mgr, return -1; } - switch ((enum virDomainChrType) dev_source->type) { + switch ((virDomainChrType) dev_source->type) { case VIR_DOMAIN_CHR_TYPE_DEV: case VIR_DOMAIN_CHR_TYPE_FILE: ret = virSecurityDACSetOwnership(dev_source->data.file.path, @@ -783,7 +783,7 @@ virSecurityDACRestoreChardevLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED, if (chr_seclabel && chr_seclabel->norelabel) return 0; - switch ((enum virDomainChrType) dev_source->type) { + switch ((virDomainChrType) dev_source->type) { case VIR_DOMAIN_CHR_TYPE_DEV: case VIR_DOMAIN_CHR_TYPE_FILE: ret = virSecurityDACRestoreSecurityFileLabel(dev_source->data.file.path);