diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-10-08 11:53:57 -0400 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-10-09 11:18:04 +1000 |
commit | 0e65b81caabbc0029d17a0a5042badb1417b2b4d (patch) | |
tree | b1ee4aebac68cb7f1239f1fb32fa127f933511e1 /utils/mount/stropts.c | |
parent | b9f4b66a81420b0832ce4ef6965b1cdc9615772c (diff) | |
download | nfs-utils-0e65b81caabbc0029d17a0a5042badb1417b2b4d.tar.gz nfs-utils-0e65b81caabbc0029d17a0a5042badb1417b2b4d.tar.xz nfs-utils-0e65b81caabbc0029d17a0a5042badb1417b2b4d.zip |
text-based mount.nfs: Remove unused top level functions
nfsmount_s() and nfs4mount_s() are no longer used, so eliminate them.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'utils/mount/stropts.c')
-rw-r--r-- | utils/mount/stropts.c | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c index 8859bf5..6f57e86 100644 --- a/utils/mount/stropts.c +++ b/utils/mount/stropts.c @@ -237,135 +237,6 @@ static int set_mandatory_options(const char *type, return 1; } -/* - * nfsmount_s - Mount an NFSv2 or v3 file system using C string options - * - * @spec: C string hostname:path specifying remoteshare to mount - * @node: C string pathname of local mounted on directory - * @flags: MS_ style flags - * @extra_opts: pointer to C string containing fs-specific mount options - * (possibly also a return argument) - * @fake: flag indicating whether to carry out the whole operation - * @child: one if this is a backgrounded mount - * - * XXX: need to handle bg, fg, and retry options. - */ -int nfsmount_s(const char *spec, const char *node, int flags, - char **extra_opts, int fake, int child) -{ - struct mount_options *options = NULL; - struct sockaddr_in saddr; - char *hostname; - int err, retval = EX_FAIL; - - if (!parse_devname(spec, &hostname)) - goto out; - err = fill_ipv4_sockaddr(hostname, &saddr); - free(hostname); - if (!err) - goto out; - - options = po_split(*extra_opts); - if (!options) { - nfs_error(_("%s: internal option parsing error"), progname); - goto out; - } - - if (!append_addr_option(&saddr, options)) - goto out; - - if (!fix_mounthost_option(options)) - goto out; - - if (po_join(options, extra_opts) == PO_FAILED) { - nfs_error(_("%s: internal option parsing error"), progname); - 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 = EX_SUCCESS; - -out: - po_destroy(options); - return retval; -} - -/* - * nfs4mount_s - Mount an NFSv4 file system using C string options - * - * @spec: C string hostname:path specifying remoteshare to mount - * @node: C string pathname of local mounted on directory - * @flags: MS_ style flags - * @extra_opts: pointer to C string containing fs-specific mount options - * (possibly also a return argument) - * @fake: flag indicating whether to carry out the whole operation - * @child: one if this is a backgrounded mount - * - * XXX: need to handle bg, fg, and retry options. - * - */ -int nfs4mount_s(const char *spec, const char *node, int flags, - char **extra_opts, int fake, int child) -{ - struct mount_options *options = NULL; - struct sockaddr_in saddr; - char *hostname; - int err, retval = EX_FAIL; - - if (!parse_devname(spec, &hostname)) - goto out; - err = fill_ipv4_sockaddr(hostname, &saddr); - free(hostname); - if (!err) - goto out; - - options = po_split(*extra_opts); - if (!options) { - nfs_error(_("%s: internal option parsing error"), progname); - goto out; - } - - if (!append_addr_option(&saddr, options)) - goto out; - - if (!append_clientaddr_option(&saddr, options)) - goto out; - - if (po_join(options, extra_opts) == PO_FAILED) { - nfs_error(_("%s: internal option parsing error"), progname); - 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 = EX_SUCCESS; - -out: - po_destroy(options); - return retval; -} - /** * nfsmount_string - Mount an NFS file system using C string options * @spec: C string specifying remote share to mount ("hostname:path") |