]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/mount.c
text-based mount.nfs: combine nfsmount_s() and nfs4mount_s() paths
[nfs-utils.git] / utils / mount / mount.c
index e6222317530da30c1ad56e2a217861d60cc2cdab..21946f727990af960e72ca2ad768b91adf134388 100644 (file)
@@ -376,14 +376,10 @@ static int try_mount(char *spec, char *mount_point, int flags,
 {
        int ret;
 
-       if (string) {
-               if (strcmp(fs_type, "nfs4") == 0)
-                       ret = nfs4mount_s(spec, mount_point, flags,
-                                               extra_opts, fake, bg);
-               else
-                       ret = nfsmount_s(spec, mount_point, flags,
-                                               extra_opts, fake, bg);
-       } else {
+       if (string)
+               ret = nfsmount_string(spec, mount_point, fs_type, flags,
+                                       extra_opts, fake, bg);
+       else {
                if (strcmp(fs_type, "nfs4") == 0)
                        ret = nfs4mount(spec, mount_point, flags,
                                        extra_opts, fake, bg);