From: David Ahern <dsahern@gmail.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 02/10] parallel: make optional
Date: Sun, 13 Feb 2011 10:30:35 -0700 [thread overview]
Message-ID: <4D58153B.8010506@gmail.com> (raw)
In-Reply-To: <AANLkTimVWX+4CYiqrpOQOMwH+SnUHPgbXHDGgQByg6r9@mail.gmail.com>
On 02/12/11 15:40, Blue Swirl wrote:
> Ignore failure with parallel device creation.
>
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
> ---
> hw/pc.h | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/hw/pc.h b/hw/pc.h
> index 443ba34..f823b7d 100644
> --- a/hw/pc.h
> +++ b/hw/pc.h
> @@ -24,7 +24,10 @@ static inline bool parallel_init(int index,
> CharDriverState *chr)
> {
> ISADevice *dev;
>
> - dev = isa_create("isa-parallel");
> + dev = isa_try_create("isa-parallel");
> + if (!dev) {
> + return false;
> + }
> qdev_prop_set_uint32(&dev->qdev, "index", index);
> qdev_prop_set_chr(&dev->qdev, "chardev", chr);
> if (qdev_init(&dev->qdev) < 0) {
How is this design supposed to be better than wrapping init functions in
#ifdef CONFIG_XXXX ... #endif?
If a hardware model is compiled out via the CONFIG options qemu should
fail to accept the command line parameters and not try to create the
device. Instead with this design it tries and fails to create the device
and yet continues on.
David
next prev parent reply other threads:[~2011-02-13 17:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-12 22:40 [Qemu-devel] [PATCH 02/10] parallel: make optional Blue Swirl
2011-02-13 17:30 ` David Ahern [this message]
2011-02-13 18:39 ` Blue Swirl
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=4D58153B.8010506@gmail.com \
--to=dsahern@gmail.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@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).