From: Laine Stump Date: Fri, 7 Oct 2016 19:51:30 +0000 (-0400) Subject: conf: add typedef for anonymous enum used for memballoon device model X-Git-Tag: v2.4.0-rc1~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b4122bf2e7831f4a59f9d9f7650774bed69abab;p=thirdparty%2Flibvirt.git conf: add typedef for anonymous enum used for memballoon device model For some reason the values of memballoon model are set using an anonymous enum, making it impossible to perform nice tricks like demanding there are cases for all possible values in a switch. This patch turns the anonymous enum into virDomainMemballoonModel. --- diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 8738c80441..10cde0e970 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1537,13 +1537,13 @@ struct _virDomainRedirFilterDef { virDomainRedirFilterUSBDevDefPtr *usbdevs; }; -enum { +typedef enum { VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO, VIR_DOMAIN_MEMBALLOON_MODEL_XEN, VIR_DOMAIN_MEMBALLOON_MODEL_NONE, VIR_DOMAIN_MEMBALLOON_MODEL_LAST -}; +} virDomainMemballoonModel; struct _virDomainMemballoonDef { int model;