conf: virDomainSEVDef: Change type of "sectype" to virDomainLaunchSecurity

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>
This commit is contained in:
Tim Wiederhake 2021-07-05 12:46:50 +02:00 committed by Ján Tomko
parent b765bc05a0
commit d09a191f62
2 changed files with 5 additions and 3 deletions

View 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",

View File

@ -2651,7 +2651,7 @@ typedef enum {
struct _virDomainSEVDef {
int sectype; /* enum virDomainLaunchSecurity */
virDomainLaunchSecurity sectype;
char *dh_cert;
char *session;
unsigned int policy;