blockdev: Modularize nfs block driver
authorColin Lord <clord@redhat.com>
Fri, 12 Aug 2016 13:27:04 +0000 (09:27 -0400)
committerMax Reitz <mreitz@redhat.com>
Tue, 20 Sep 2016 20:12:57 +0000 (22:12 +0200)
Modularizes the nfs block driver so that it gets dynamically loaded.

Signed-off-by: Colin Lord <clord@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1471008424-16465-5-git-send-email-clord@redhat.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/Makefile.objs
configure

index 3da471e388682dc2c9e73e9c0af2bb39ea6920de..cb158e9275f9e1653994874f0a5224e2e5df8b7f 100644 (file)
@@ -29,6 +29,7 @@ block-obj-y += crypto.o
 
 common-obj-y += stream.o
 
+nfs.o-libs         := $(LIBNFS_LIBS)
 iscsi.o-cflags     := $(LIBISCSI_CFLAGS)
 iscsi.o-libs       := $(LIBISCSI_LIBS)
 curl.o-cflags      := $(CURL_CFLAGS)
index 7d083bdd859227b2b9cc06b4b6143306901878d2..2efc3382e15dfe8419fc5b1e2e0fea6ca6d86126 100755 (executable)
--- a/configure
+++ b/configure
@@ -4578,7 +4578,6 @@ if test "$libnfs" != "no" ; then
   if $pkg_config --atleast-version=1.9.3 libnfs; then
     libnfs="yes"
     libnfs_libs=$($pkg_config --libs libnfs)
-    LIBS="$LIBS $libnfs_libs"
   else
     if test "$libnfs" = "yes" ; then
       feature_not_found "libnfs" "Install libnfs devel >= 1.9.3"
@@ -5351,7 +5350,8 @@ if test "$libiscsi" = "yes" ; then
 fi
 
 if test "$libnfs" = "yes" ; then
-  echo "CONFIG_LIBNFS=y" >> $config_host_mak
+  echo "CONFIG_LIBNFS=m" >> $config_host_mak
+  echo "LIBNFS_LIBS=$libnfs_libs" >> $config_host_mak
 fi
 
 if test "$seccomp" = "yes"; then