- struct mount_options *options = NULL;
- struct sockaddr_in saddr;
- char *hostname;
- int err, retval = EX_FAIL;
-
- if (!parse_devname(spec, &hostname))
- goto out;
- err = fill_ipv4_sockaddr(hostname, &saddr);
- free(hostname);
- if (!err)
- goto out;
-
- options = po_split(*extra_opts);
- if (!options) {
- nfs_error(_("%s: internal option parsing error"), progname);
- goto out;
- }
-
- if (!set_mandatory_options(type, &saddr, options))
- goto out;
-
- if (try_mount(spec, node, type, flags, options, fake, extra_opts)) {
- mount_error(spec, node, errno);
- goto out;
- }
+ struct nfsmount_info mi = {
+ .spec = spec,
+ .node = node,
+ .type = type,
+ .extra_opts = extra_opts,
+ .flags = flags,
+ .fake = fake,
+ .child = child,
+#ifdef IPV6_SUPPORTED
+ .family = AF_UNSPEC, /* either IPv4 or v6 */
+#else
+ .family = AF_INET, /* only IPv4 */
+#endif
+ };
+ int retval = EX_FAIL;