qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Claudio Fontana <cfontana@suse.de>, Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	dinechin@redhat.com, "Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH] accel: print an error message and exit if plugin not loaded
Date: Mon, 5 Sep 2022 17:07:21 +0100	[thread overview]
Message-ID: <4975855c-a4bd-ec9c-2a2c-755cd7cea0a6@linaro.org> (raw)
In-Reply-To: <879a973a-c5b0-2a23-bb24-92bf5500f63f@suse.de>

On 9/5/22 16:43, Claudio Fontana wrote:
> You might think 'mayfail' can be called by other code as true in some cases, but no, it's always false.
> I wonder why this "mayfail" argument exists and is propagated at all, when it cannot be anything else than false.
> I tried to remove the "mayfail" parameter completely and things seem just fine.
> 
> In any case, the only thing that "mayfail" seems to control, is in module_load_file, and is a single printf:
> 
>      g_module = g_module_open(fname, flags);
>      if (!g_module) {
>          if (!mayfail) {
>              fprintf(stderr, "Failed to open module: %s\n",
>                      g_module_error());
>          }
>          ret = -EINVAL;
>          goto out;
>      }
> 
> 
> Weird.. Is someone building proprietary modules on top of QEMU? Is this what this is currently trying to address?
> But then, the result is just a printf...

I thought it was for things like vga_interface_available, which probes for the vga 
modules, but then gracefully handles an error.

There's definitely something wrong with the plumbing here.


r~


  reply	other threads:[~2022-09-05 16:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 10:13 [PATCH] accel: print an error message and exit if plugin not loaded Claudio Fontana
2022-09-05 12:06 ` Richard Henderson
2022-09-05 14:36   ` Claudio Fontana
2022-09-05 15:43     ` Claudio Fontana
2022-09-05 16:07       ` Richard Henderson [this message]
2022-09-06  9:53       ` Gerd Hoffmann
2022-09-06 11:59         ` Claudio Fontana
2022-09-06 12:14           ` Claudio Fontana
2022-09-07  7:46             ` Gerd Hoffmann

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=4975855c-a4bd-ec9c-2a2c-755cd7cea0a6@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=berrange@redhat.com \
    --cc=cfontana@suse.de \
    --cc=dinechin@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.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).