+
+ return 1;
+}
+
+/*
+ * Set up mandatory non-version specific NFS mount options.
+ *
+ * Returns 1 if successful; otherwise zero.
+ */
+static int nfs_validate_options(struct nfsmount_info *mi)
+{
+ struct addrinfo hint = {
+ .ai_protocol = (int)IPPROTO_UDP,
+ .ai_flags = AI_ADDRCONFIG,
+ };
+ sa_family_t family;
+ int error;
+
+ if (!nfs_parse_devname(mi->spec, &mi->hostname, NULL))
+ return 0;
+
+ if (!nfs_nfs_proto_family(mi->options, &family))
+ return 0;
+
+ hint.ai_family = (int)family;
+ error = getaddrinfo(mi->hostname, NULL, &hint, &mi->address);
+ if (error != 0) {
+ nfs_error(_("%s: Failed to resolve server %s: %s"),
+ progname, mi->hostname, gai_strerror(error));
+ mi->address = NULL;
+ return 0;
+ }
+
+ if (!nfs_set_version(mi))
+ return 0;