# HG changeset patch # User Richard Dunbar # Date 1356056840 0 # Node ID 77850ece4ff6c200af70d50afe095e04a818e711 # Parent 9eab99827fe66301cd294759353a91e0bddc901f busybox: fix nfs mount (bug 26) diff -r 9eab99827fe6 -r 77850ece4ff6 busybox/receipt --- a/busybox/receipt Fri Dec 21 08:40:15 2012 +0000 +++ b/busybox/receipt Fri Dec 21 02:27:20 2012 +0000 @@ -41,6 +41,7 @@ su-nochdir.u diff.u blkid-swap.u +nfs-segfault.u EOT cp $stuff/$PACKAGE-${VERSION%.*}.config .config } diff -r 9eab99827fe6 -r 77850ece4ff6 busybox/stuff/busybox-1.20-nfs-segfault.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.20-nfs-segfault.u Fri Dec 21 02:27:20 2012 +0000 @@ -0,0 +1,37 @@ +--- a/util-linux/mount.c ++++ b/util-linux/mount.c +@@ -285,9 +285,6 @@ + + + struct globals { +-#if ENABLE_FEATURE_MOUNT_NFS +- smalluint nfs_mount_version; +-#endif + #if ENABLE_FEATURE_MOUNT_VERBOSE + unsigned verbose; + #endif +@@ -296,7 +293,7 @@ + } FIX_ALIASING; + enum { GETMNTENT_BUFSIZE = COMMON_BUFSIZE - offsetof(struct globals, getmntent_buf) }; + #define G (*(struct globals*)&bb_common_bufsiz1) +-#define nfs_mount_version (G.nfs_mount_version) ++#define nfs_mount_version 4 /* assume kernel>= 2.4, use v4 nfs mount protocol */ + #if ENABLE_FEATURE_MOUNT_VERBOSE + #define verbose (G.verbose ) + #else +@@ -937,6 +934,7 @@ + static void + find_kernel_nfs_mount_version(void) + { ++#if 0 + int kernel_version; + + if (nfs_mount_version) +@@ -950,6 +948,7 @@ + nfs_mount_version = 3; + /* else v4 since 2.3.99pre4 */ + } ++#endif + } + + static void \ No newline at end of file