Skip to contentSkip to conversation

text-based mount.nfs: Use new call that handles NFSv2/3 foreground mounting

PATCH New Chuck Lever 1 participant 1 message Sep 12, 2007

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

PATCH 19/24 text-based mount.nfs: Use new call that handles NFSv2/3 foreground mounting

Call foreground mount processing script from the main text-based mount routine. Background NFSv2/3 mounts will fail immediately until the next couple of patches are applied.

---

 utils/mount/stropts.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
utils/mount/stropts.c +4 -8
index 892790e..6658308 100644
@@ -396,10 +396,8 @@ static int try_nfsmount(const char *spec, const char *node,
 	 * Kernel returns EOPNOTSUPP if the RPC bind failed,
 	 * and EPROTONOSUPPORT if the version isn't supported.
 	 */
-	if (errno != EOPNOTSUPP && errno != EPROTONOSUPPORT) {
-		mount_error(spec, node, errno);
+	if (errno != EOPNOTSUPP && errno != EPROTONOSUPPORT)
 		return 0;
-	}
 
 	if (!rewrite_mount_opts(options))
 		goto parse_err;
@@ -415,8 +413,6 @@ static int try_nfsmount(const char *spec, const char *node,
 	if (!mount(spec, node, "nfs",
 				flags & ~(MS_USER|MS_USERS), *extra_opts))
 		return 1;
-
-	mount_error(spec, node, errno);
 	return 0;
 
 parse_err:
@@ -515,9 +511,9 @@ int nfsmount_s(const char *spec, const char *node, int flags,
 	if (!fix_up_mounthost_opt(options))
 		goto out;
 
-	if (!try_nfsmount(spec, node, flags, options, fake, extra_opts))
-		goto out;
-	retval = 0;
+	if (po_rightmost(options, "bg", "fg") > -1)
+		retval =  nfsmount_fg(spec, node, flags, options,
+							fake, extra_opts);
 
 out:
 	po_destroy(options);

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