mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Applied patch from Chris Jaeger <cjaeger@ensim.com> to do better checking for
NFS_MOUNT_VERSION, depending on which kernel you're running.
This commit is contained in:
parent
9b300d0b1f
commit
065c7e779a
19
nfsmount.c
19
nfsmount.c
@ -183,7 +183,8 @@ static int nfs_mount_version;
|
|||||||
* nfs_mount_version: version this source and running kernel can handle
|
* nfs_mount_version: version this source and running kernel can handle
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
find_kernel_nfs_mount_version(void) {
|
find_kernel_nfs_mount_version(void)
|
||||||
|
{
|
||||||
static int kernel_version = 0;
|
static int kernel_version = 0;
|
||||||
|
|
||||||
if (kernel_version)
|
if (kernel_version)
|
||||||
@ -193,15 +194,17 @@ find_kernel_nfs_mount_version(void) {
|
|||||||
|
|
||||||
kernel_version = get_kernel_revision();
|
kernel_version = get_kernel_revision();
|
||||||
if (kernel_version) {
|
if (kernel_version) {
|
||||||
if (kernel_version < MAKE_VERSION(2,1,32))
|
if (kernel_version < MAKE_VERSION(2,1,32))
|
||||||
nfs_mount_version = 1;
|
nfs_mount_version = 1;
|
||||||
else if (kernel_version < MAKE_VERSION(2,3,99))
|
else if (kernel_version < MAKE_VERSION(2,2,18) ||
|
||||||
nfs_mount_version = 3;
|
(kernel_version >= MAKE_VERSION(2,3,0) &&
|
||||||
else
|
kernel_version < MAKE_VERSION(2,3,99)))
|
||||||
nfs_mount_version = 4; /* since 2.3.99pre4 */
|
nfs_mount_version = 3;
|
||||||
|
else
|
||||||
|
nfs_mount_version = 4; /* since 2.3.99pre4 */
|
||||||
}
|
}
|
||||||
if (nfs_mount_version > NFS_MOUNT_VERSION)
|
if (nfs_mount_version > NFS_MOUNT_VERSION)
|
||||||
nfs_mount_version = NFS_MOUNT_VERSION;
|
nfs_mount_version = NFS_MOUNT_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pmap *
|
static struct pmap *
|
||||||
|
@ -183,7 +183,8 @@ static int nfs_mount_version;
|
|||||||
* nfs_mount_version: version this source and running kernel can handle
|
* nfs_mount_version: version this source and running kernel can handle
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
find_kernel_nfs_mount_version(void) {
|
find_kernel_nfs_mount_version(void)
|
||||||
|
{
|
||||||
static int kernel_version = 0;
|
static int kernel_version = 0;
|
||||||
|
|
||||||
if (kernel_version)
|
if (kernel_version)
|
||||||
@ -193,15 +194,17 @@ find_kernel_nfs_mount_version(void) {
|
|||||||
|
|
||||||
kernel_version = get_kernel_revision();
|
kernel_version = get_kernel_revision();
|
||||||
if (kernel_version) {
|
if (kernel_version) {
|
||||||
if (kernel_version < MAKE_VERSION(2,1,32))
|
if (kernel_version < MAKE_VERSION(2,1,32))
|
||||||
nfs_mount_version = 1;
|
nfs_mount_version = 1;
|
||||||
else if (kernel_version < MAKE_VERSION(2,3,99))
|
else if (kernel_version < MAKE_VERSION(2,2,18) ||
|
||||||
nfs_mount_version = 3;
|
(kernel_version >= MAKE_VERSION(2,3,0) &&
|
||||||
else
|
kernel_version < MAKE_VERSION(2,3,99)))
|
||||||
nfs_mount_version = 4; /* since 2.3.99pre4 */
|
nfs_mount_version = 3;
|
||||||
|
else
|
||||||
|
nfs_mount_version = 4; /* since 2.3.99pre4 */
|
||||||
}
|
}
|
||||||
if (nfs_mount_version > NFS_MOUNT_VERSION)
|
if (nfs_mount_version > NFS_MOUNT_VERSION)
|
||||||
nfs_mount_version = NFS_MOUNT_VERSION;
|
nfs_mount_version = NFS_MOUNT_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pmap *
|
static struct pmap *
|
||||||
|
Loading…
Reference in New Issue
Block a user