Re: [PATCH] daemon: Do not lose storage driver

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

 



On 06/05/2012 04:12 AM, Osier Yang wrote:
> Per WITH_STORAGE_DIR is always defined as long as libvirtd is built,

s/Per/Since/

> it's fine to use it as the condition.
> ---
>  daemon/libvirtd.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
> index c74cd43..7db02e3 100644
> --- a/daemon/libvirtd.c
> +++ b/daemon/libvirtd.c
> @@ -366,7 +366,7 @@ static void daemonInitialize(void)
>  # ifdef WITH_NETWORK
>      virDriverLoadModule("network");
>  # endif
> -# ifdef WITH_STORAGE
> +# ifdef WITH_STORAGE_DIR
>      virDriverLoadModule("storage");
>  # endif
>  # ifdef WITH_NODE_DEVICES

Incomplete.  Grepping the sources for uses of 'WITH_STORAGE*', I see:

tests/virdrivermoduletest.c:#ifdef WITH_STORAGE

as another instance of an undefined macro usage.

Also, configure.ac _does_ allow you to disable WITH_STORAGE_DIR but
still build libvirtd.  I think the real solution is to add something
like this to configure.ac:

for tmp in dir fd lvm iscsi scsi mpath rbd disk; do
    if eval test \$with_storage_$tmp = yes; then
        AC_DEFINE([WITH_STORAGE], [1],
          [Define to 1 if at least one storage backend is in use])
        break
    fi
done

At which point, WITH_STORAGE will really be what we want to know that at
least one storage driver was built and not explicitly disabled by
configure options.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]