+ if (!nfs_name_to_address(mounthost, family, sap, &salen)) {
+ nfs_error(_("%s: unable to determine mount server's address"),
+ progname);
+ return 0;
+ }
+
+ return nfs_append_generic_address_option(sap, salen,
+ "mountaddr", options);
+}
+
+/*
+ * Returns zero if the "lock" option is in effect, but statd
+ * can't be started. Otherwise, returns 1.
+ */
+static int nfs_verify_lock_option(struct mount_options *options)
+{
+ if (po_rightmost(options, "nolock", "lock") == PO_KEY1_RIGHTMOST)
+ return 1;
+
+ if (!start_statd()) {
+ nfs_error(_("%s: rpc.statd is not running but is "
+ "required for remote locking."), progname);
+ nfs_error(_("%s: Either use '-o nolock' to keep "
+ "locks local, or start statd."), progname);