mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
qemuDomainGetGuestInfo: Prepare for refactor to virTypedParamList
Use of raw typed param APIs is very clunky. Prepare qemuDomainGetGuestInfo for step-by-step refactor to virTypedParamList. The two lists will coexist until the refactor is complete. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
89a57e7fe0
commit
d6b34d0de8
@ -19483,6 +19483,8 @@ qemuDomainGetGuestInfo(virDomainPtr dom,
|
||||
double load15m = 0;
|
||||
bool format_load = false;
|
||||
size_t i;
|
||||
g_autoptr(virTypedParamList) list = virTypedParamListNew();
|
||||
g_autoptr(virTypedParamList) tmplist = NULL;
|
||||
|
||||
virCheckFlags(0, -1);
|
||||
|
||||
@ -19592,6 +19594,14 @@ qemuDomainGetGuestInfo(virDomainPtr dom,
|
||||
virTypedParamsAddDouble(params, nparams, &maxparams, "load.15m", load15m);
|
||||
}
|
||||
|
||||
/* temporarily allow the old and new construction style to coexist */
|
||||
tmplist = virTypedParamListFromParams(params, *nparams);
|
||||
virTypedParamListConcat(tmplist, &list);
|
||||
list = g_steal_pointer(&tmplist);
|
||||
|
||||
if (virTypedParamListSteal(list, params, nparams) < 0)
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
|
Loading…
x
Reference in New Issue
Block a user