From: Thomas Huth <thuth@redhat.com>
To: Eduardo Otubo <otubo@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, jsnow@redhat.com, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] isa-fdc: assert replaced by proper error exit
Date: Fri, 1 Sep 2017 13:37:34 +0200 [thread overview]
Message-ID: <fecde0d9-8289-af04-e1aa-79d0be06ca32@redhat.com> (raw)
In-Reply-To: <20170901110706.429-1-otubo@redhat.com>
On 01.09.2017 13:07, Eduardo Otubo wrote:
> When not available, isa-fdc falls into assert instead of proper error
> exit. This patch fixes this behavior.
>
> Signed-off-by: Eduardo Otubo <otubo@redhat.com>
> ---
> hw/block/fdc.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/hw/block/fdc.c b/hw/block/fdc.c
> index 401129073b..0b6def4e1d 100644
> --- a/hw/block/fdc.c
> +++ b/hw/block/fdc.c
> @@ -2699,11 +2699,15 @@ static void isabus_fdc_realize(DeviceState *dev, Error **errp)
> fdctrl->dma_chann = isa->dma;
> if (fdctrl->dma_chann != -1) {
> fdctrl->dma = isa_get_dma(isa_bus_from_device(isadev), isa->dma);
> - assert(fdctrl->dma);
> + if (!fdctrl->dma) {
> + error_setg(errp, "isa-fdc not supported");
> + goto error;
> + }
> }
>
> qdev_set_legacy_instance_id(dev, isa->iobase, 2);
> fdctrl_realize_common(dev, fdctrl, &err);
> +error:
> if (err != NULL) {
> error_propagate(errp, err);
> return;
Maybe add the reproducer to the commit message:
qemu-system-ppc64 -S -machine powernv -device isa-fdc
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2017-09-01 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-01 11:07 [Qemu-devel] [PATCH] isa-fdc: assert replaced by proper error exit Eduardo Otubo
2017-09-01 11:37 ` Thomas Huth [this message]
2017-09-01 13:02 ` Markus Armbruster
2017-09-01 19:29 ` John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fecde0d9-8289-af04-e1aa-79d0be06ca32@redhat.com \
--to=thuth@redhat.com \
--cc=jsnow@redhat.com \
--cc=otubo@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).