From d81ac240145d6759619a7db901f498def7858d62 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Fri, 23 Jul 2021 15:42:16 -0400 Subject: [PATCH] qemu_vhost_user: don't raise error for unknown features 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 Reviewed-by: Peter Krempa Signed-off-by: Cole Robinson --- 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; }