From: Tim Wiederhake Date: Mon, 5 Jul 2021 10:46:50 +0000 (+0200) Subject: conf: virDomainSEVDef: Change type of "sectype" to virDomainLaunchSecurity X-Git-Tag: v7.6.0-rc1~249 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d09a191f6295015fa20a068f1dcc3a4c73181732;p=thirdparty%2Flibvirt.git conf: virDomainSEVDef: Change type of "sectype" to virDomainLaunchSecurity Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko Signed-off-by: Ján Tomko --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c1438d85f4..68ab18f3ab 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -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", diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index a14a2090f8..c31531c93b 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2651,7 +2651,7 @@ typedef enum { struct _virDomainSEVDef { - int sectype; /* enum virDomainLaunchSecurity */ + virDomainLaunchSecurity sectype; char *dh_cert; char *session; unsigned int policy;