aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authormarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-02-01 19:51:13 +0000
committermarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-02-01 19:51:13 +0000
commit8c34cc5a73a0d7e86b104b09d60b08177d0e3ab6 (patch)
tree0f5b80cd6ec437642023bcae1ae321cb7e98b7f5 /util-linux
parent472f3a626513678c2ffb94ea2eeca7142cfccfa9 (diff)
downloadbusybox-w32-8c34cc5a73a0d7e86b104b09d60b08177d0e3ab6.tar.gz
busybox-w32-8c34cc5a73a0d7e86b104b09d60b08177d0e3ab6.tar.bz2
busybox-w32-8c34cc5a73a0d7e86b104b09d60b08177d0e3ab6.zip
Applied patch from Chris Jaeger <cjaeger@ensim.com> to do better checking for
NFS_MOUNT_VERSION, depending on which kernel you're running. git-svn-id: svn://busybox.net/trunk/busybox@1737 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/nfsmount.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c
index 397858b71..e615d1d63 100644
--- a/util-linux/nfsmount.c
+++ b/util-linux/nfsmount.c
@@ -183,7 +183,8 @@ static int nfs_mount_version;
183 * nfs_mount_version: version this source and running kernel can handle 183 * nfs_mount_version: version this source and running kernel can handle
184 */ 184 */
185static void 185static void
186find_kernel_nfs_mount_version(void) { 186find_kernel_nfs_mount_version(void)
187{
187 static int kernel_version = 0; 188 static int kernel_version = 0;
188 189
189 if (kernel_version) 190 if (kernel_version)
@@ -193,15 +194,17 @@ find_kernel_nfs_mount_version(void) {
193 194
194 kernel_version = get_kernel_revision(); 195 kernel_version = get_kernel_revision();
195 if (kernel_version) { 196 if (kernel_version) {
196 if (kernel_version < MAKE_VERSION(2,1,32)) 197 if (kernel_version < MAKE_VERSION(2,1,32))
197 nfs_mount_version = 1; 198 nfs_mount_version = 1;
198 else if (kernel_version < MAKE_VERSION(2,3,99)) 199 else if (kernel_version < MAKE_VERSION(2,2,18) ||
199 nfs_mount_version = 3; 200 (kernel_version >= MAKE_VERSION(2,3,0) &&
200 else 201 kernel_version < MAKE_VERSION(2,3,99)))
201 nfs_mount_version = 4; /* since 2.3.99pre4 */ 202 nfs_mount_version = 3;
203 else
204 nfs_mount_version = 4; /* since 2.3.99pre4 */
202 } 205 }
203 if (nfs_mount_version > NFS_MOUNT_VERSION) 206 if (nfs_mount_version > NFS_MOUNT_VERSION)
204 nfs_mount_version = NFS_MOUNT_VERSION; 207 nfs_mount_version = NFS_MOUNT_VERSION;
205} 208}
206 209
207static struct pmap * 210static struct pmap *