]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: virDomainSEVDef: Change type of "sectype" to virDomainLaunchSecurity
authorTim Wiederhake <twiederh@redhat.com>
Mon, 5 Jul 2021 10:46:50 +0000 (12:46 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 7 Jul 2021 13:34:11 +0000 (15:34 +0200)
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h

index c1438d85f4c1f76171dd4ab7d39804cf81efb6bd..68ab18f3aba693c2eb96a06fcafc1458a974ea7d 100644 (file)
@@ -14722,6 +14722,7 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode,
     virDomainSEVDef *def;
     unsigned long policy;
     g_autofree char *type = NULL;
+    int sectype;
     int rc = -1;
 
     def = g_new0(virDomainSEVDef, 1);
@@ -14734,8 +14735,8 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode,
         goto error;
     }
 
-    def->sectype = virDomainLaunchSecurityTypeFromString(type);
-    switch ((virDomainLaunchSecurity) def->sectype) {
+    sectype = virDomainLaunchSecurityTypeFromString(type);
+    switch ((virDomainLaunchSecurity) sectype) {
     case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
         break;
     case VIR_DOMAIN_LAUNCH_SECURITY_NONE:
@@ -14746,6 +14747,7 @@ virDomainSEVDefParseXML(xmlNodePtr sevNode,
                        type);
         goto error;
     }
+    def->sectype = sectype;
 
     if (virXPathULongHex("string(./policy)", ctxt, &policy) < 0) {
         virReportError(VIR_ERR_XML_ERROR, "%s",
index a14a2090f8d63e197bee01fecf077689b15dccea..c31531c93bdb30a773f57d5ebdecb2aa046134d6 100644 (file)
@@ -2651,7 +2651,7 @@ typedef enum {
 
 
 struct _virDomainSEVDef {
-    int sectype; /* enum virDomainLaunchSecurity */
+    virDomainLaunchSecurity sectype;
     char *dh_cert;
     char *session;
     unsigned int policy;