]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/nfsmount.c
mount.nfs: No need to return nfs_mount_data structs
[nfs-utils.git] / utils / mount / nfsmount.c
index a3cbbbe595680fc612d41e7556eeb1b15e17672f..b6a0d6041040f66b0cb7e0220ceddcec7d0654da 100644 (file)
@@ -487,8 +487,7 @@ out_bad:
 
 int
 nfsmount(const char *spec, const char *node, int *flags,
-        char **extra_opts, char **mount_opts,
-        int running_bg, int fake)
+        char **extra_opts, int running_bg, int fake)
 {
        static char *prev_bg_host;
        char hostdir[1024];
@@ -618,7 +617,6 @@ nfsmount(const char *spec, const char *node, int *flags,
 #endif
 
        data.version = nfs_mount_data_version;
-       *mount_opts = (char *) &data;
 
        if (*flags & MS_REMOUNT)
                goto out_ok;
@@ -862,6 +860,14 @@ noauth_flavors:
                }
        }
 
+       if (!fake) {
+               if (mount(spec, node, "nfs",
+                               *flags & ~(MS_USER|MS_USERS), &data)) {
+                       mount_error(spec, node, errno);
+                       goto fail;
+               }
+       }
+
        return 0;
 
        /* abort */