diff options
author | Steve Dickson <steved@redhat.com> | 2015-11-20 10:19:19 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2015-11-21 10:34:04 -0500 |
commit | 685d63db0e91efd48c05453cf35434f22f1b1d26 (patch) | |
tree | 9e59d762896a16d10838c2ecd5f86b9b13e6a4ad | |
parent | 1d8d4e469d02aa574cb8529651809c0be90c3923 (diff) | |
download | nfs-utils-685d63db0e91efd48c05453cf35434f22f1b1d26.tar.gz nfs-utils-685d63db0e91efd48c05453cf35434f22f1b1d26.tar.xz nfs-utils-685d63db0e91efd48c05453cf35434f22f1b1d26.zip |
mount.nfs: Teach mount.nfs about the mountversion option
When the mountversion option is used, there should
not be any mount negotiations with the server.
Also, when the option is used, its know that the mount
is a v4 mount and a V_SPECFIC type.
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | utils/mount/network.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/mount/network.c b/utils/mount/network.c index b5ed850..ebc39d3 100644 --- a/utils/mount/network.c +++ b/utils/mount/network.c @@ -92,6 +92,7 @@ static const char *nfs_version_opttbl[] = { "v4", "vers", "nfsvers", + "minorversion", NULL, }; @@ -1272,7 +1273,11 @@ nfs_nfs_version(struct mount_options *options, struct nfs_version *version) if (!(version->major = strtol(version_val, &cptr, 10))) goto ret_error; - if (version->major < 4) + if (strcmp(nfs_version_opttbl[i], "minorversion") == 0) { + version->v_mode = V_SPECIFIC; + version->minor = version->major; + version->major = 4; + } else if (version->major < 4) version->v_mode = V_SPECIFIC; if (*cptr == '.') { |