qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] accel: print an error message and exit if plugin not loaded


From: Richard Henderson
Subject: Re: [PATCH] accel: print an error message and exit if plugin not loaded
Date: Mon, 5 Sep 2022 17:07:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]