summaryrefslogtreecommitdiffstats
path: root/utils/mount/stropts.c
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2009-10-17 09:26:18 -0400
committerSteve Dickson <steved@redhat.com>2009-10-22 15:34:48 -0400
commita8b90e8f64a7d53b20c0980f2a6d9a8d5945bcc4 (patch)
tree0b002b3b21146ef5c335b2249114953fdffcbcca /utils/mount/stropts.c
parent2f61f62ac777cc03e30513f6fd3699f9e2f04e27 (diff)
downloadnfs-utils-a8b90e8f64a7d53b20c0980f2a6d9a8d5945bcc4.tar.gz
nfs-utils-a8b90e8f64a7d53b20c0980f2a6d9a8d5945bcc4.tar.xz
nfs-utils-a8b90e8f64a7d53b20c0980f2a6d9a8d5945bcc4.zip
Use the default protocol and version values, when they
are set in the configuration file, to start the negation with the server Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mount/stropts.c')
-rw-r--r--utils/mount/stropts.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index 069bdc1..ceefdb0 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -45,6 +45,7 @@
#include "parse_opt.h"
#include "version.h"
#include "parse_dev.h"
+#include "conffile.h"
#ifndef NFS_PROGRAM
#define NFS_PROGRAM (100003)
@@ -283,6 +284,14 @@ static int nfs_validate_options(struct nfsmount_info *mi)
if (option && strcmp(option, "rdma") == 0)
mi->version = 3;
}
+ /*
+ * Use the default value set in the config file when
+ * the version has not been explicitly set.
+ */
+ if (mi->version == 0 && config_default_vers) {
+ if (config_default_vers < 4)
+ mi->version = config_default_vers;
+ }
if (!nfs_append_sloppy_option(mi->options))
return 0;