mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
qemuDomainGetLaunchSecurityInfo: Move flag check to top level
The flag check inside 'qemuDomainGetSEVInfo' makes no sense because it only validates the 'VIR_TYPED_PARAM_STRING_OKAY' which is not actually used. Remove the 'flags parameter from 'qemuDomainGetSEVInfo' and validate flags at 'qemuDomainGetLaunchSecurityInfo' Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
1 parent
c707c1d17d
commit
40629050b5
1 file changed
+4
-5
@@ -19680,16 +19680,13 @@ qemuNodeGetSEVInfo(virConnectPtr conn,
|
||||
|
||||
static int
|
||||
qemuDomainGetSEVInfo(virDomainObj *vm,
|
||||
virTypedParamList *list,
|
||||
unsigned int flags)
|
||||
virTypedParamList *list)
|
||||
{
|
||||
int ret = -1;
|
||||
int rv;
|
||||
g_autofree char *tmp = NULL;
|
||||
qemuMonitorSEVInfo info = { };
|
||||
|
||||
virCheckFlags(VIR_TYPED_PARAM_STRING_OKAY, -1);
|
||||
|
||||
if (virDomainObjBeginJob(vm, VIR_JOB_QUERY) < 0)
|
||||
return -1;
|
||||
|
||||
@@ -19749,6 +19746,8 @@ qemuDomainGetLaunchSecurityInfo(virDomainPtr domain,
|
||||
virDomainObj *vm;
|
||||
int ret = -1;
|
||||
|
||||
virCheckFlags(VIR_TYPED_PARAM_STRING_OKAY, -1);
|
||||
|
||||
if (!(vm = qemuDomainObjFromDomain(domain)))
|
||||
goto cleanup;
|
||||
|
||||
@@ -19763,7 +19762,7 @@ qemuDomainGetLaunchSecurityInfo(virDomainPtr domain,
|
||||
switch (vm->def->sec->sectype) {
|
||||
case VIR_DOMAIN_LAUNCH_SECURITY_SEV:
|
||||
case VIR_DOMAIN_LAUNCH_SECURITY_SEV_SNP:
|
||||
if (qemuDomainGetSEVInfo(vm, list, flags) < 0)
|
||||
if (qemuDomainGetSEVInfo(vm, list) < 0)
|
||||
goto cleanup;
|
||||
break;
|
||||
case VIR_DOMAIN_LAUNCH_SECURITY_PV:
|
||||
|
||||
Reference in new issue
Block a user