]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: add typedef for anonymous enum used for memballoon device model
authorLaine Stump <laine@laine.org>
Fri, 7 Oct 2016 19:51:30 +0000 (15:51 -0400)
committerLaine Stump <laine@laine.org>
Sun, 23 Oct 2016 16:33:40 +0000 (12:33 -0400)
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.

src/conf/domain_conf.h

index 8738c80441adf8d01fa6dfae78f2458bfe3f4c93..10cde0e970bbc64f2d73e1438651f0e81f0e426e 100644 (file)
@@ -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;