int nfsmount_s(const char *spec, const char *node, int flags,
char **extra_opts, int fake, int child)
{
+ struct mount_options *options = NULL;
struct sockaddr_in saddr;
char *hostname;
int err, retval = EX_FAIL;
extract_interesting_options(*extra_opts);
+ options = po_split(*extra_opts);
+ if (!options) {
+ nfs_error(_("%s: internal option parsing error"), progname);
+ goto out;
+ }
+
if (!child && addr_opt) {
nfs_error(_("%s: Illegal option: 'addr='"), progname);
goto out;
if (!append_addr_opt(&saddr, extra_opts))
goto out;
+ if (po_join(options, extra_opts) == PO_FAILED) {
+ nfs_error(_("%s: internal option parsing error"), progname);
+ goto out;
+ }
+
if (verbose)
printf(_("%s: text-based options: '%s'\n"),
progname, *extra_opts);
retval = EX_SUCCESS;
out:
+ po_destroy(options);
return retval;
}
int nfs4mount_s(const char *spec, const char *node, int flags,
char **extra_opts, int fake, int child)
{
+ struct mount_options *options = NULL;
struct sockaddr_in saddr;
char *hostname;
int err, retval = EX_FAIL;
extract_interesting_options(*extra_opts);
+ options = po_split(*extra_opts);
+ if (!options) {
+ nfs_error(_("%s: internal option parsing error"), progname);
+ goto out;
+ }
+
if (addr_opt) {
nfs_error(_("%s: Illegal option: 'addr='"), progname);
goto out;
if (!ca_opt && !append_clientaddr_opt(&saddr, extra_opts))
goto out;
+ if (po_join(options, extra_opts) == PO_FAILED) {
+ nfs_error(_("%s: internal option parsing error"), progname);
+ goto out;
+ }
+
if (verbose)
printf(_("%s: text-based options: '%s'\n"),
progname, *extra_opts);
retval = EX_SUCCESS;
out:
+ po_destroy(options);
return retval;
}