Use the same wording as for SCSI controllers, which also happens to contain additional information (the controller's index). The new error message and error type are more accurate anyway: in most cases, it's perfectly fine for the user not to provide a controller model explicitly, as libvirt will try to figure out a reasonable default. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- src/qemu/qemu_validate.c | 5 +++-- ...b-controller-default-unavailable-i440fx.x86_64-latest.err | 2 +- .../usb-controller-default-unavailable-q35.x86_64-latest.err | 2 +- tests/qemuxmlconfdata/usb-legacy-device.x86_64-latest.err | 2 +- tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.err | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index ad1621a120..1c661b5b34 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3560,8 +3560,9 @@ qemuValidateDomainDeviceDefControllerUSB(const virDomainControllerDef *def, return 0; if (def->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("no model provided for USB controller")); + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Unable to determine model for USB controller idx=%1$d"), + def->idx); return -1; } diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-i440fx.x86_64-latest.err b/tests/qemuxmlconfdata/usb-controller-default-unavailable-i440fx.x86_64-latest.err index 7a71aa107d..cac4e8e760 100644 --- a/tests/qemuxmlconfdata/usb-controller-default-unavailable-i440fx.x86_64-latest.err +++ b/tests/qemuxmlconfdata/usb-controller-default-unavailable-i440fx.x86_64-latest.err @@ -1 +1 @@ -unsupported configuration: no model provided for USB controller +internal error: Unable to determine model for USB controller idx=0 diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-q35.x86_64-latest.err b/tests/qemuxmlconfdata/usb-controller-default-unavailable-q35.x86_64-latest.err index 7a71aa107d..cac4e8e760 100644 --- a/tests/qemuxmlconfdata/usb-controller-default-unavailable-q35.x86_64-latest.err +++ b/tests/qemuxmlconfdata/usb-controller-default-unavailable-q35.x86_64-latest.err @@ -1 +1 @@ -unsupported configuration: no model provided for USB controller +internal error: Unable to determine model for USB controller idx=0 diff --git a/tests/qemuxmlconfdata/usb-legacy-device.x86_64-latest.err b/tests/qemuxmlconfdata/usb-legacy-device.x86_64-latest.err index 7a71aa107d..cac4e8e760 100644 --- a/tests/qemuxmlconfdata/usb-legacy-device.x86_64-latest.err +++ b/tests/qemuxmlconfdata/usb-legacy-device.x86_64-latest.err @@ -1 +1 @@ -unsupported configuration: no model provided for USB controller +internal error: Unable to determine model for USB controller idx=0 diff --git a/tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.err b/tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.err index 7a71aa107d..cac4e8e760 100644 --- a/tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.err +++ b/tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.err @@ -1 +1 @@ -unsupported configuration: no model provided for USB controller +internal error: Unable to determine model for USB controller idx=0 -- 2.43.0 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx