progname);
goto fail;
}
- snprintf(new_opts, sizeof(new_opts), "%s%saddr=%s",
- old_opts, *old_opts ? "," : "", s);
+ if (running_bg)
+ strncpy(new_opts, old_opts, sizeof(new_opts));
+ else
+ snprintf(new_opts, sizeof(new_opts), "%s%saddr=%s",
+ old_opts, *old_opts ? "," : "", s);
*extra_opts = xstrdup(new_opts);
/* Set default options.
break;
}
- switch(rpc_createerr.cf_stat){
- case RPC_TIMEDOUT:
- break;
- case RPC_SYSTEMERROR:
- if (errno == ETIMEDOUT)
+ if (!bg) {
+ switch(rpc_createerr.cf_stat) {
+ case RPC_TIMEDOUT:
break;
- default:
- rpc_mount_errors(hostname, 0, bg);
- goto fail;
+ case RPC_SYSTEMERROR:
+ if (errno == ETIMEDOUT)
+ break;
+ default:
+ rpc_mount_errors(hostname, 0, bg);
+ goto fail;
+ }
}
if (bg && !running_bg) {