- * @spec: C string hostname:path specifying remoteshare to mount
- * @node: C string pathname of local mounted on directory
- * @flags: MS_ style flags
+ * Returns 1 if successful. Otherwise, returns zero.
+ * "errno" is set to reflect the individual error.
+ */
+static int try_mount(const char *spec, const char *node, const char *type,
+ int flags, struct mount_options *options, int fake,
+ char **extra_opts)
+{
+ if (strncmp(type, "nfs4", 4) == 0)
+ return try_nfs4mount(spec, node, flags,
+ options, fake, extra_opts);
+ else
+ return try_nfs23mount(spec, node, flags,
+ options, fake, extra_opts);
+}
+
+/**
+ * nfsmount_string - Mount an NFS file system using C string options
+ * @spec: C string specifying remote share to mount ("hostname:path")
+ * @node: C string pathname of local mounted-on directory
+ * @type: C string that represents file system type ("nfs" or "nfs4")
+ * @flags: MS_ style mount flags