text-based mount.nfs: Use helpers for invoking mount(2) system call
Subsystems (2)
PATCH 14/24 text-based mount.nfs: Use helpers for invoking mount(2) system call
Use the new mount system call helpers.
Signed-off-by Chuck Lever <[email protected]>
---
utils/mount/stropts.c | 38 ++------------------------------------ 1 files changed, 2 insertions(+), 36 deletions(-)
utils/mount/stropts.c +2 -36
@@ -281,25 +281,8 @@ int nfsmount_s(const char *spec, const char *node, int flags,if (!fix_up_mounthost_opt (options)) goto out; -free (*extra_opts); - *extra_opts =po_join (options); -if (!*extra_opts) { -nfs_error (_ ("%s: internal option parsing error" ), progname); +if (!try_nfsmount (spec, node, flags, options, fake, extra_opts)) goto out; - } - -if (verbose) -printf (_ ("%s: text-based options: '%s'\n" ), - progname, *extra_opts); - -if (!fake) { -if (mount (spec, node,"nfs" , - flags & ~(MS_USER |MS_USERS ), *extra_opts)) { -mount_error (spec, node, errno); - goto out; - } - } - retval =0 ; out:
@@ -380,25 +363,8 @@ int nfs4mount_s(const char *spec, const char *node, int flags,if (!append_clientaddr_option (&saddr, options)) goto out; -free (*extra_opts); - *extra_opts =po_join (options); -if (!options) { -nfs_error (_ ("%s: internal option parsing error" ), progname); +if (!try_nfs4mount (spec, node, flags, options, fake, extra_opts)) goto out; - } - -if (verbose) -printf (_ ("%s: text-based options: '%s'\n" ), - progname, *extra_opts); - -if (!fake) { -if (mount (spec, node,"nfs4" , - flags & ~(MS_USER |MS_USERS ), *extra_opts)) { -mount_error (spec, node, errno); - goto out; - } - } - retval =0 ; out:
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs