On 12/01/2017 08:06 AM, Pavel Hrdina wrote:
On Fri, Dec 01, 2017 at 07:31:31PM +0800, Lin Ma wrote:
> The corresponding code will be moved to qemuDomainControllerDefValidate
> by next patch.
>
> Signed-off-by: Lin Ma <lma(a)suse.com>
> ---
> src/qemu/qemu_command.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 6a8da1d..2074ff6 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -3127,17 +3127,9 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
> /* Since we currently only support the integrated IDE
> * controller on various boards, if we ever get to here, it's
> * because some other machinetype had an IDE controller
> - * specified, or one with a single IDE contraller had multiple
> + * specified, or one with a single IDE controller had multiple
> * ide controllers specified.
> */
> - if (qemuDomainHasBuiltinIDE(domainDef))
> - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> - _("Only a single IDE controller is supported "
> - "for this machine type"));
> - else
> - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> - _("IDE controllers are unsupported for "
> - "this QEMU binary or machine type"));
This is not correct, we shouldn't error out without setting any error
message. This whole case should be removed and IDE controller should
be handled by the "default" path if it ever happen to reach this code.
Hmm.. yeah, you make a good point... Having the default: path handle
this scenario is perhaps better - it's one of those shouldn't get here
type deals because we wouldn't be adding any sort of "ide" on the
command line at this point and should never call this if the Validation
code did it's job.
Still as I noted in my cover letter response to this series - subsuming
this into another series which I'll post after the freeze.
John
Pavel
> goto error;
>
> default:
> --
> 2.9.2
>
> --
> libvir-list mailing list
> libvir-list(a)redhat.com
>
https://www.redhat.com/mailman/listinfo/libvir-list
>
>
> --
> libvir-list mailing list
> libvir-list(a)redhat.com
>
https://www.redhat.com/mailman/listinfo/libvir-list