Similar to what was done for qemu_firmware.c in 61d95a1073, don't
report an error for unknown vhost-user features, just log it and
correctly continue on
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
src/qemu/qemu_vhost_user.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_vhost_user.c b/src/qemu/qemu_vhost_user.c
index bc8e7ad898..75cc718c09 100644
--- a/src/qemu/qemu_vhost_user.c
+++ b/src/qemu/qemu_vhost_user.c
@@ -280,6 +280,7 @@ qemuVhostUserGPUFillCapabilities(qemuVhostUser *vu,
qemuVhostUserGPU *gpu = &vu->capabilities.gpu;
virJSONValue *featuresJSON;
size_t nfeatures;
+ size_t nparsed = 0;
size_t i;
g_autoptr(qemuVhostUserGPUFeature) features = NULL;
@@ -299,17 +300,16 @@ qemuVhostUserGPUFillCapabilities(qemuVhostUser *vu,
int tmp;
if ((tmp = qemuVhostUserGPUFeatureTypeFromString(tmpStr)) <= 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unknown feature %s"),
- tmpStr);
+ VIR_DEBUG("ignoring unknown QEMU vhost-user feature '%s'",
tmpStr);
continue;
}
- features[i] = tmp;
+ features[nparsed] = tmp;
+ nparsed++;
}
gpu->features = g_steal_pointer(&features);
- gpu->nfeatures = nfeatures;
+ gpu->nfeatures = nparsed;
return 0;
}
--
2.31.1