}
/*
- * Append the 'clientaddr=' option to the options string.
+ * Called if no 'clientaddr=' option was specified in the options string
+ * to discover our address and append an appropriate 'clientaddr=' option
+ * to the options string.
*
* Returns 1 if 'clientaddr=' option created successfully;
* otherwise zero.
* @extra_opts: pointer to C string containing fs-specific mount options
* (possibly also a return argument)
* @fake: flag indicating whether to carry out the whole operation
- * @bg: one if this is a backgrounded mount attempt
+ * @child: one if this is a backgrounded mount
*
* XXX: need to handle bg, fg, and retry options.
*/
int nfsmount_s(const char *spec, const char *node, int flags,
- char **extra_opts, int fake, int bg)
+ char **extra_opts, int fake, int child)
{
struct sockaddr_in saddr;
char *hostname;
extract_interesting_options(*extra_opts);
- if (!bg && addr_opt) {
+ if (!child && addr_opt) {
nfs_error(_("%s: Illegal option: 'addr='"), progname);
return EX_FAIL;
}
}
}
- return 0;
+ return EX_SUCCESS;
}
/*
return EX_FAIL;
}
- if (ca_opt) {
- nfs_error(_("%s: Illegal option: 'clientaddr='"), progname);
- return EX_FAIL;
- }
-
if (!append_addr_opt(&saddr, extra_opts))
return EX_FAIL;
- if (!append_clientaddr_opt(&saddr, extra_opts))
+ if (!ca_opt && !append_clientaddr_opt(&saddr, extra_opts))
return EX_FAIL;
if (verbose)
}
}
- return 0;
+ return EX_SUCCESS;
}