summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-09-28 16:36:56 -0400
committerNeil Brown <neilb@suse.de>2007-09-29 07:58:57 +1000
commit39003947436f6676096e1fec3d3f09c95024d0a6 (patch)
treef676bea30e56be97b174f8920d4b2a070743190c /utils
parentd79455dbd3dfde28e41574786afd0f71a38df746 (diff)
downloadnfs-utils-39003947436f6676096e1fec3d3f09c95024d0a6.tar.gz
nfs-utils-39003947436f6676096e1fec3d3f09c95024d0a6.tar.xz
nfs-utils-39003947436f6676096e1fec3d3f09c95024d0a6.zip
text-based mount.nfs: start using new mount option parsing facility
Use the new mount option parsing functions to handle existing mount option string parsing needs in the text-based mount implementation. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'utils')
-rw-r--r--utils/mount/stropts.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index bdc8f2c..537a924 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -317,20 +317,13 @@ int nfsmount_s(const char *spec, const char *node, int flags,
if (!err)
goto out;
- extract_interesting_options(*extra_opts);
-
options = po_split(*extra_opts);
if (!options) {
nfs_error(_("%s: internal option parsing error"), progname);
goto out;
}
- if (!child && addr_opt) {
- nfs_error(_("%s: Illegal option: 'addr='"), progname);
- goto out;
- }
-
- if (!append_addr_opt(&saddr, extra_opts))
+ if (!append_addr_option(&saddr, options))
goto out;
if (po_join(options, extra_opts) == PO_FAILED) {
@@ -386,23 +379,16 @@ int nfs4mount_s(const char *spec, const char *node, int flags,
if (!err)
goto out;
- extract_interesting_options(*extra_opts);
-
options = po_split(*extra_opts);
if (!options) {
nfs_error(_("%s: internal option parsing error"), progname);
goto out;
}
- if (addr_opt) {
- nfs_error(_("%s: Illegal option: 'addr='"), progname);
- goto out;
- }
-
- if (!append_addr_opt(&saddr, extra_opts))
+ if (!append_addr_option(&saddr, options))
goto out;
- if (!ca_opt && !append_clientaddr_opt(&saddr, extra_opts))
+ if (!append_clientaddr_option(&saddr, options))
goto out;
if (po_join(options, extra_opts) == PO_FAILED) {