[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: |
Gerd Hoffmann |
Subject: |
Re: [PATCH] accel: print an error message and exit if plugin not loaded |
Date: |
Tue, 6 Sep 2022 11:53:25 +0200 |
> 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?
Nope.
But modules have dependencies to stuff like pci bus, usb bus, vga which
might not be satisfied by some system emulators, and trying to load
those modules will fail then because of unresolved symbols. If you drop
that 'make check' will log a pile of errors ...
Dropping mayfail and return an 'Error' instead makes sense, then it is
up to the caller to report or not report the failure. When calling down
from module_load_qom_all() you might want ignore errors for the reasons
outlined above, in most other caes it probably makes sense to report
them.
take care,
Gerd
- [PATCH] accel: print an error message and exit if plugin not loaded, Claudio Fontana, 2022/09/05
- Re: [PATCH] accel: print an error message and exit if plugin not loaded, Richard Henderson, 2022/09/05
- Re: [PATCH] accel: print an error message and exit if plugin not loaded, Claudio Fontana, 2022/09/05
- Re: [PATCH] accel: print an error message and exit if plugin not loaded, Claudio Fontana, 2022/09/05
- Re: [PATCH] accel: print an error message and exit if plugin not loaded, Richard Henderson, 2022/09/05
- Re: [PATCH] accel: print an error message and exit if plugin not loaded,
Gerd Hoffmann <=
- Re: [PATCH] accel: print an error message and exit if plugin not loaded, Claudio Fontana, 2022/09/06
- Re: [PATCH] accel: print an error message and exit if plugin not loaded, Claudio Fontana, 2022/09/06
- Re: [PATCH] accel: print an error message and exit if plugin not loaded, Gerd Hoffmann, 2022/09/07