
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@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org