]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
text-based mount.nfs: Use helpers for invoking mount(2) system call
authorChuck Lever <chuck.lever@oracle.com>
Wed, 10 Oct 2007 19:06:37 +0000 (15:06 -0400)
committerNeil Brown <neilb@suse.de>
Thu, 11 Oct 2007 01:03:18 +0000 (11:03 +1000)
Expose support for NFS version and transport protocol fallback for NFSv2/3
mounts.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
utils/mount/stropts.c

index 1d2cde6d0386d4bfc702134b8f62b420289543bb..13523f8814bd00aa6319435fa374a9e0e92de293 100644 (file)
@@ -538,23 +538,11 @@ int nfsmount_string(const char *spec, const char *node, const char *type,
        if (!set_mandatory_options(type, &saddr, options))
                goto out;
 
-       if (po_join(options, extra_opts) == PO_FAILED) {
-               nfs_error(_("%s: internal option parsing error"), progname);
+       if (try_mount(spec, node, type, flags, options, fake, extra_opts)) {
+               mount_error(spec, node, errno);
                goto out;
        }
 
-       if (verbose)
-               printf(_("%s: text-based options: '%s'\n"),
-                       progname, *extra_opts);
-
-       if (!fake) {
-               if (mount(spec, node, type,
-                               flags & ~(MS_USER|MS_USERS), *extra_opts)) {
-                       mount_error(spec, node, errno);
-                       goto out;
-               }
-       }
-
        retval = EX_SUCCESS;
 
 out: