wok rev 13725

busybox: fix nfs mount (bug 26)
author Richard Dunbar <mojo@slitaz.org>
date Fri Dec 21 02:27:20 2012 +0000 (2012-12-21)
parents 9eab99827fe6
children b9dde6ba0be0
files busybox/receipt busybox/stuff/busybox-1.20-nfs-segfault.u
line diff
     1.1 --- a/busybox/receipt	Fri Dec 21 08:40:15 2012 +0000
     1.2 +++ b/busybox/receipt	Fri Dec 21 02:27:20 2012 +0000
     1.3 @@ -41,6 +41,7 @@
     1.4  su-nochdir.u
     1.5  diff.u
     1.6  blkid-swap.u
     1.7 +nfs-segfault.u
     1.8  EOT
     1.9      cp $stuff/$PACKAGE-${VERSION%.*}.config .config
    1.10  }
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/busybox/stuff/busybox-1.20-nfs-segfault.u	Fri Dec 21 02:27:20 2012 +0000
     2.3 @@ -0,0 +1,37 @@
     2.4 +--- a/util-linux/mount.c
     2.5 ++++ b/util-linux/mount.c
     2.6 +@@ -285,9 +285,6 @@
     2.7 + 
     2.8 + 
     2.9 + struct globals {
    2.10 +-#if ENABLE_FEATURE_MOUNT_NFS
    2.11 +-	smalluint nfs_mount_version;
    2.12 +-#endif
    2.13 + #if ENABLE_FEATURE_MOUNT_VERBOSE
    2.14 + 	unsigned verbose;
    2.15 + #endif
    2.16 +@@ -296,7 +293,7 @@
    2.17 + } FIX_ALIASING;
    2.18 + enum { GETMNTENT_BUFSIZE = COMMON_BUFSIZE - offsetof(struct globals, getmntent_buf) };
    2.19 + #define G (*(struct globals*)&bb_common_bufsiz1)
    2.20 +-#define nfs_mount_version (G.nfs_mount_version)
    2.21 ++#define nfs_mount_version 4 /* assume kernel>= 2.4, use v4 nfs mount protocol */
    2.22 + #if ENABLE_FEATURE_MOUNT_VERBOSE
    2.23 + #define verbose           (G.verbose          )
    2.24 + #else
    2.25 +@@ -937,6 +934,7 @@
    2.26 + static void
    2.27 + find_kernel_nfs_mount_version(void)
    2.28 + {
    2.29 ++#if 0
    2.30 + 	int kernel_version;
    2.31 + 
    2.32 + 	if (nfs_mount_version)
    2.33 +@@ -950,6 +948,7 @@
    2.34 + 			nfs_mount_version = 3;
    2.35 + 		/* else v4 since 2.3.99pre4 */
    2.36 + 	}
    2.37 ++#endif
    2.38 + }
    2.39 + 
    2.40 + static void
    2.41 \ No newline at end of file