-};
-
-static int nfs_parse_devname(struct nfsmount_info *mi)
-{
- int ret = 0;
- char *dev, *pathname, *s;
-
- dev = xstrdup(mi->spec);
-
- if (!(pathname = strchr(dev, ':'))) {
- nfs_error(_("%s: remote share not in 'host:dir' format"),
- progname);
- goto out;
- }
- *pathname = '\0';
- pathname++;
-
- /*
- * We don't need a copy of the pathname, but let's
- * sanity check it anyway.
- */
- if (strlen(pathname) > NFS_MAXPATHNAME) {
- nfs_error(_("%s: export pathname is too long"),
- progname);
- goto out;
- }
-
- /*
- * 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);
- }
- mi->hostname = xstrdup(dev);
- if (strlen(mi->hostname) > NFS_MAXHOSTNAME) {
- nfs_error(_("%s: server hostname is too long"),
- progname);
- free(mi->hostname);
- mi->hostname = NULL;
- goto out;
- }
-
- ret = 1;
-
-out:
- free(dev);
- return ret;
-}
-
-static int fill_ipv4_sockaddr(const char *hostname, struct sockaddr_in *addr)
-{
- struct hostent *hp;
- addr->sin_family = AF_INET;