[libvirt] [PATCH v3 3/4] qemu_command: Drop IDE validation code in qemuBuildControllerDevStr

Pavel Hrdina phrdina at redhat.com
Fri Dec 1 13:06:38 UTC 2017


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 at 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.

Pavel

>          goto error;
>  
>      default:
> -- 
> 2.9.2
> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20171201/1d2a899a/attachment-0001.sig>


More information about the libvir-list mailing list