提交 be9771a1 编写于 作者: P Peter Krempa

virQEMUCapsProbeQMPDeviceProperties: Switch to local implementation

Reimplement device property detection directly rather than using
virQEMUCapsProbeQMPGenericProps in preparation for changes to the
detection code.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 568200eb
......@@ -2610,11 +2610,27 @@ static int
virQEMUCapsProbeQMPDeviceProperties(virQEMUCapsPtr qemuCaps,
qemuMonitorPtr mon)
{
return virQEMUCapsProbeQMPGenericProps(qemuCaps,
mon,
virQEMUCapsDeviceProps,
G_N_ELEMENTS(virQEMUCapsDeviceProps),
qemuMonitorGetDeviceProps);
size_t i;
for (i = 0; i < G_N_ELEMENTS(virQEMUCapsDeviceProps); i++) {
virQEMUCapsObjectTypeProps *device = virQEMUCapsDeviceProps + i;
VIR_AUTOSTRINGLIST values = NULL;
int nvalues;
if (device->capsCondition >= 0 &&
!virQEMUCapsGet(qemuCaps, device->capsCondition))
continue;
if ((nvalues = qemuMonitorGetDeviceProps(mon, device->type, &values)) < 0)
return -1;
virQEMUCapsProcessStringFlags(qemuCaps,
device->nprops,
device->props,
nvalues, values);
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册