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

Re: [libvirt] [PATCH 04/11] driver: Split/refactor driver module loading




On 02/08/2017 11:27 AM, Peter Krempa wrote:
> Split the convoluted driver loader function into simpler parts which
> will potentially allow reuse.
> ---
>  src/driver.c                    | 133 +++++++++++++++++++++++++++++-----------
>  src/driver.h                    |   3 +
>  src/libvirt_driver_modules.syms |   1 +
>  3 files changed, 101 insertions(+), 36 deletions(-)
> 
> diff --git a/src/driver.c b/src/driver.c
> index 67ac02006..783e08a28 100644
> --- a/src/driver.c
> +++ b/src/driver.c
> @@ -43,15 +43,105 @@ VIR_LOG_INIT("driver");
>  # include <dlfcn.h>
>  # define DEFAULT_DRIVER_DIR LIBDIR "/libvirt/connection-driver"
> 
> +
> +static void *
> +virDriverLoadModuleFile(const char *file)
> +{
> +    void *handle = NULL;
> +
> +    VIR_DEBUG("Load module file '%s'", file);

NIT: Moving this here removes from the more general [1] location, no big
deal. Still should the virFileFindResourceFull failure path get
VIR_ERROR too or would the virReportOOMErrorFull be "good enough"?

ACK in general - just trying to think about odd failures...

John


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