]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Remove some incorrect version matching code.
authorNeil Brown <neilb@suse.de>
Fri, 16 Mar 2007 06:13:52 +0000 (17:13 +1100)
committerNeil Brown <neilb@suse.de>
Fri, 16 Mar 2007 06:13:52 +0000 (17:13 +1100)
The version of the interface to the kernel for requesting a mount
it entirely different to the version of NFS that is being mounted.

utils/mount/mount.c
utils/mount/nfs_mount.h
utils/mount/nfsmount.c

index 72cb89d7602ef6c0f00ea686d58f2a9d8443b01e..0edcc1a2565f444263376ced71f127d4e2e07b9c 100644 (file)
@@ -386,7 +386,7 @@ int main(int argc, char *argv[])
        else if (!strcmp(progname, "mount.nfs")) {
                int need_statd = 0;
                mnt_err = nfsmount(spec, mount_point, &flags,
-                                  &extra_opts, &mount_opts, &nfs_mount_vers,
+                                  &extra_opts, &mount_opts,
                                   0, &need_statd);
                if (!mnt_err && !fake && need_statd)
                        start_statd();
index 1acb633faf48108c5edde320d1117f5d199be0b3..a8d1f1ad6edbf9a2daa5cd3f85dab3c34d55474b 100644 (file)
@@ -78,7 +78,7 @@ struct nfs_mount_data {
 #define AUTH_GSS_SPKMP         390011
 #endif
 
-int nfsmount(const char *, const char *, int *, char **, char **, int *,
+int nfsmount(const char *, const char *, int *, char **, char **,
             int, int *);
 void mount_errors(char *, int, int);
 
index db1f544d672c116ef872aa83a2ff57660d987380..eac9590f5610d836045fcb2aeaf60e54f86804d7 100644 (file)
@@ -830,7 +830,7 @@ nfsmnt_check_compat(const struct pmap *nfs_pmap, const struct pmap *mnt_pmap)
 
 int
 nfsmount(const char *spec, const char *node, int *flags,
-        char **extra_opts, char **mount_opts, int *nfs_mount_vers,
+        char **extra_opts, char **mount_opts,
         int running_bg, int *need_statd)
 {
        static char *prev_bg_host;
@@ -860,11 +860,7 @@ nfsmount(const char *spec, const char *node, int *flags,
        time_t prevt;
        time_t timeout;
 
-       /* The version to try is either specified or 0
-          In case it is 0 we tell the caller what we tried */
-       if (!*nfs_mount_vers)
-               *nfs_mount_vers = find_kernel_nfs_mount_version();
-       nfs_mount_version = *nfs_mount_vers;
+       nfs_mount_version = find_kernel_nfs_mount_version();
 
        if (strlen(spec) >= sizeof(hostdir)) {
                fprintf(stderr, _("mount: "