Blame SOURCES/nfs-utils-1.3.0-mount-v4arg-fix.patch

fc3648
diff -up nfs-utils-1.3.0/utils/mount/stropts.c.orig nfs-utils-1.3.0/utils/mount/stropts.c
fc3648
--- nfs-utils-1.3.0/utils/mount/stropts.c.orig	2016-12-18 10:59:32.526389233 -0500
fc3648
+++ nfs-utils-1.3.0/utils/mount/stropts.c	2016-12-18 11:02:17.564900647 -0500
fc3648
@@ -108,12 +108,6 @@ static void nfs_default_version(struct n
fc3648
 		return;
fc3648
 	}
fc3648
 
fc3648
-	if (mi->version.v_mode == V_GENERAL &&
fc3648
-		config_default_vers.v_mode == V_DEFAULT) {
fc3648
-		mi->version.v_mode = V_SPECIFIC;
fc3648
-		return;
fc3648
-	}
fc3648
-
fc3648
 	if (mi->version.v_mode == V_DEFAULT &&
fc3648
 		config_default_vers.v_mode != V_DEFAULT) {
fc3648
 		mi->version.major = config_default_vers.major;
fc3648
@@ -121,9 +115,9 @@ static void nfs_default_version(struct n
fc3648
 		return;
fc3648
 	}
fc3648
 
fc3648
-	if (mi->version.v_mode == V_GENERAL &&
fc3648
-		config_default_vers.v_mode != V_DEFAULT) {
fc3648
-		if (mi->version.major == config_default_vers.major)
fc3648
+	if (mi->version.v_mode == V_GENERAL) {
fc3648
+		if (config_default_vers.v_mode != V_DEFAULT &&
fc3648
+		    mi->version.major == config_default_vers.major)
fc3648
 			mi->version.minor = config_default_vers.minor;
fc3648
 		return;
fc3648
 	}
fc3648
@@ -751,8 +745,13 @@ static int nfs_do_mount_v4(struct nfsmou
fc3648
 	}
fc3648
 
fc3648
 	if (mi->version.v_mode != V_SPECIFIC) {
fc3648
-		snprintf(version_opt, sizeof(version_opt) - 1,
fc3648
-			"vers=%lu.%lu", mi->version.major, mi->version.minor);
fc3648
+		if (mi->version.v_mode == V_GENERAL)
fc3648
+			snprintf(version_opt, sizeof(version_opt) - 1,
fc3648
+				"vers=%lu", mi->version.major);
fc3648
+		else
fc3648
+			snprintf(version_opt, sizeof(version_opt) - 1,
fc3648
+				"vers=%lu.%lu", mi->version.major,
fc3648
+				mi->version.minor);
fc3648
 
fc3648
 		if (po_append(options, version_opt) == PO_FAILED) {
fc3648
 			errno = EINVAL;