- /*
- * Ignore all but first hostname in replicated mounts
- * until they can be fully supported. (mack@sgi.com)
- */
- if ((s = strchr(dev, ','))) {
- *s = '\0';
- nfs_error(_("%s: warning: multiple hostnames not supported"),
- progname);
- nfs_error(_("%s: ignoring hostnames that follow the first one"),
- progname);
- }
- *hostname = xstrdup(dev);
- if (strlen(*hostname) > NFS_MAXHOSTNAME) {
- nfs_error(_("%s: server hostname is too long"),
- progname);
- free(*hostname);
- goto out;
+/*
+ * Obtain a retry timeout value based on the value of the "retry=" option.
+ *
+ * Returns a time_t timeout timestamp, in seconds.
+ */
+static time_t nfs_parse_retry_option(struct mount_options *options,
+ unsigned int timeout_minutes)
+{
+ char *retry_option, *endptr;
+
+ retry_option = po_get(options, "retry");
+ if (retry_option) {
+ long tmp;
+
+ errno = 0;
+ tmp = strtol(retry_option, &endptr, 10);
+ if (errno == 0 && endptr != retry_option && tmp >= 0)
+ timeout_minutes = tmp;
+ else if (verbose)
+ nfs_error(_("%s: invalid retry timeout was specified; "
+ "using default timeout"), progname);