diff mbox

[v6,4/4] blockdev: Modularize nfs block driver

Message ID 1470147137-21970-5-git-send-email-clord@redhat.com
State New
Headers show

Commit Message

clord@redhat.com Aug. 2, 2016, 2:12 p.m. UTC
Modularizes the nfs block driver so that it gets dynamically loaded.
---
 block/Makefile.objs | 1 +
 configure           | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Stefan Hajnoczi Aug. 8, 2016, 3:23 p.m. UTC | #1
On Tue, Aug 02, 2016 at 10:12:17AM -0400, Colin Lord wrote:
> Modularizes the nfs block driver so that it gets dynamically loaded.
> ---
>  block/Makefile.objs | 1 +
>  configure           | 4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff mbox

Patch

diff --git a/block/Makefile.objs b/block/Makefile.objs
index 595f366..fa4d8b8 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -28,6 +28,7 @@  block-obj-y += crypto.o
 common-obj-y += stream.o
 common-obj-y += backup.o
 
+nfs.o-libs         := $(LIBNFS_LIBS)
 iscsi.o-cflags     := $(LIBISCSI_CFLAGS)
 iscsi.o-libs       := $(LIBISCSI_LIBS)
 curl.o-cflags      := $(CURL_CFLAGS)
diff --git a/configure b/configure
index f57fcc6..f1e7d14 100755
--- a/configure
+++ b/configure
@@ -4561,7 +4561,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"
@@ -5320,7 +5319,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