On 11/19/2014 05:50 AM, Wang Rui wrote: > Signed-off-by: Wang Rui <moon.wangrui@xxxxxxxxxx> > --- > src/qemu/qemu_hotplug.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c > index b9a0cee..1c75861 100644 > --- a/src/qemu/qemu_hotplug.c > +++ b/src/qemu/qemu_hotplug.c > @@ -2347,7 +2347,7 @@ qemuDomainChangeGraphics(virQEMUDriverPtr driver, > switch ((virDomainGraphicsListenType) newlisten->type) { > case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS: > if (STRNEQ_NULLABLE(newlisten->address, oldlisten->address)) { > - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", > + virReportError(VIR_ERR_INVALID_ARG, "%s", But the arguments are valid, we just can't change them. I think 'operation unsupported' would be a better error code. Jan > dev->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC ? > _("cannot change listen address setting on vnc graphics") : > _("cannot change listen address setting on spice graphics")); > @@ -2377,12 +2377,12 @@ qemuDomainChangeGraphics(virQEMUDriverPtr driver, > if ((olddev->data.vnc.autoport != dev->data.vnc.autoport) || > (!dev->data.vnc.autoport && > (olddev->data.vnc.port != dev->data.vnc.port))) { > - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", > + virReportError(VIR_ERR_INVALID_ARG, "%s", > _("cannot change port settings on vnc graphics")); > goto cleanup; > } > if (STRNEQ_NULLABLE(olddev->data.vnc.keymap, dev->data.vnc.keymap)) { > - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", > + virReportError(VIR_ERR_INVALID_ARG, "%s", > _("cannot change keymap setting on vnc graphics")); > goto cleanup; > } > @@ -2423,13 +2423,13 @@ qemuDomainChangeGraphics(virQEMUDriverPtr driver, > (olddev->data.spice.port != dev->data.spice.port)) || > (!dev->data.spice.autoport && > (olddev->data.spice.tlsPort != dev->data.spice.tlsPort))) { > - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", > + virReportError(VIR_ERR_INVALID_ARG, "%s", > _("cannot change port settings on spice graphics")); > goto cleanup; > } > if (STRNEQ_NULLABLE(olddev->data.spice.keymap, > dev->data.spice.keymap)) { > - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", > + virReportError(VIR_ERR_INVALID_ARG, "%s", > _("cannot change keymap setting on spice graphics")); > goto cleanup; > } >
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list