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

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

 




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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux