Skip to contentSkip to conversation

text-based mount.nfs: start using new mount option parsing facility

PATCH In review Chuck Lever 1 participant 1 message Sep 25, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/7 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.

---

 utils/mount/stropts.c |   20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)
utils/mount/stropts.c +3 -17
index bdc8f2c..537a924 100644
@@ -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) {

-------------------------------------------------------------------------
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