summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2011-04-26 13:50:11 +0000
committerrmacklem <rmacklem@FreeBSD.org>2011-04-26 13:50:11 +0000
commit42001445f1faf025f673623feee8363cb4b2868c (patch)
tree1c2e6a28e9428a827876b31682f28917da19ab42 /sys/nfsclient
parent18f7e5472cc0511ca2344a138dda4e57c99a75be (diff)
downloadFreeBSD-src-42001445f1faf025f673623feee8363cb4b2868c.zip
FreeBSD-src-42001445f1faf025f673623feee8363cb4b2868c.tar.gz
Fix a kernel linking problem introduced by r221032, r221040
when building kernels that don't have "options NFS_ROOT" specified. I plan on moving the functions that use these data structures into the shared code in sys/nfs/nfs_diskless.c in a future commit. At that time, these definitions will no longer be needed in nfs_vfsops.c and nfs_clvfsops.c. MFC after: 2 weeks
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_vfsops.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 0f29740..5b346a6 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -164,6 +164,18 @@ static struct nfs_rpcops nfs_rpcops = {
nfs_commit,
};
+/*
+ * This structure is now defined in sys/nfs/nfs_diskless.c so that it
+ * can be shared by both NFS clients. It is declared here so that it
+ * will be defined for kernels built without NFS_ROOT, although it
+ * isn't used in that case.
+ */
+#ifndef NFS_ROOT
+struct nfs_diskless nfs_diskless = { { { 0 } } };
+struct nfsv3_diskless nfsv3_diskless = { { { 0 } } };
+int nfs_diskless_valid = 0;
+#endif
+
SYSCTL_INT(_vfs_nfs, OID_AUTO, diskless_valid, CTLFLAG_RD,
&nfs_diskless_valid, 0,
"Has the diskless struct been filled correctly");
OpenPOWER on IntegriCloud