wok view busybox/stuff/busybox-1.20-nfs-segfault.u @ 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
children 5b96796d9df5
line source
1 --- a/util-linux/mount.c
2 +++ b/util-linux/mount.c
3 @@ -285,9 +285,6 @@
6 struct globals {
7 -#if ENABLE_FEATURE_MOUNT_NFS
8 - smalluint nfs_mount_version;
9 -#endif
10 #if ENABLE_FEATURE_MOUNT_VERBOSE
11 unsigned verbose;
12 #endif
13 @@ -296,7 +293,7 @@
14 } FIX_ALIASING;
15 enum { GETMNTENT_BUFSIZE = COMMON_BUFSIZE - offsetof(struct globals, getmntent_buf) };
16 #define G (*(struct globals*)&bb_common_bufsiz1)
17 -#define nfs_mount_version (G.nfs_mount_version)
18 +#define nfs_mount_version 4 /* assume kernel>= 2.4, use v4 nfs mount protocol */
19 #if ENABLE_FEATURE_MOUNT_VERBOSE
20 #define verbose (G.verbose )
21 #else
22 @@ -937,6 +934,7 @@
23 static void
24 find_kernel_nfs_mount_version(void)
25 {
26 +#if 0
27 int kernel_version;
29 if (nfs_mount_version)
30 @@ -950,6 +948,7 @@
31 nfs_mount_version = 3;
32 /* else v4 since 2.3.99pre4 */
33 }
34 +#endif
35 }
37 static void