Skip to contentSkip to conversation

text-based mount.nfs: Remove a helper function that is no longer used

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

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

PATCH 5/19 text-based mount.nfs: Remove a helper function that is no longer used

Remove an older string parsing function in the text-based mount.nfs implementation that is no longer used, in favor of the new option parsing helpers.

---

 utils/mount/stropts.c |   37 -------------------------------------
 1 files changed, 0 insertions(+), 37 deletions(-)
utils/mount/stropts.c +0 -37
index da9c14a..796a741 100644
@@ -65,11 +65,6 @@ extern int nfs_mount_data_version;
 extern char *progname;
 extern int verbose;
 
-static int retry_opt = 10000;		/* 10,000 minutes ~= 1 week */
-static int bg_opt = 0;
-static int addr_opt = 0;
-static int ca_opt = 0;
-
 static int parse_devname(const char *spec, char **hostname)
 {
 	int ret = 0;
@@ -142,38 +137,6 @@ static int fill_ipv4_sockaddr(const char *hostname, struct sockaddr_in *addr)
 }
 
 /*
- * Walk through our mount options string, and indicate the presence
- * of 'bg', 'retry=', 'addr=', and 'clientaddr='.
- */
-static void extract_interesting_options(char *opts)
-{
-	char *opt, *opteq;
-	int val;
-
-	opts = xstrdup(opts);
-
-	for (opt = strtok(opts, ","); opt; opt = strtok(NULL, ",")) {
-		if ((opteq = strchr(opt, '='))) {
-			val = atoi(opteq + 1);
-			*opteq = '\0';
-			if (strcmp(opt, "bg") == 0)
-				bg_opt++;
-			else if (strcmp(opt, "retry") == 0)
-				retry_opt = val;
-			else if (strcmp(opt, "addr") == 0)
-				addr_opt++;
-			else if (strcmp(opt, "clientaddr") == 0)
-				ca_opt++;
-		} else {
-			if (strcmp(opt, "bg") == 0)
-				bg_opt++;
-		}
-	}
-
-	free(opts);
-}
-
-/*
  * Append the 'addr=' option to the options string to pass a resolved
  * server address to the kernel.  After a successful mount, this address
  * is also added to /etc/mtab for use when unmounting.

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