#include "pseudoflavors.h"
#include "nls.h"
-#include "conn.h"
#include "xcommon.h"
#include "mount_constants.h"
#include "nfs4_mount.h"
#include "nfs_mount.h"
#include "error.h"
+#include "network.h"
#if defined(VAR_LOCK_DIR)
#define DEFAULT_DIR VAR_LOCK_DIR
if (access(GSSDLCK, F_OK)) { \
printf(_("Warning: rpc.gssd appears not to be running.\n")); \
} \
-} while(0);
+} while(0);
#ifndef NFS_PORT
#define NFS_PORT 2049
}
int nfs4mount(const char *spec, const char *node, int flags,
- char **extra_opts, int fake)
+ char **extra_opts, int fake, int running_bg)
{
static struct nfs4_mount_data data;
static char hostdir[1024];
val = 0;
opt += 2;
}
- if (!strcmp(opt, "bg"))
+ if (!strcmp(opt, "bg"))
bg = val;
- else if (!strcmp(opt, "fg"))
+ else if (!strcmp(opt, "fg"))
bg = !val;
else if (!strcmp(opt, "soft"))
soft = val;
else if (!strcmp(opt, "sharecache"))
unshared = !val;
else if (!sloppy) {
- printf(_("unknown nfs mount option: "
- "%s%s\n"), val ? "" : "no", opt);
+ printf(_("unknown nfs mount option: %s%s\n"),
+ val ? "" : "no", opt);
goto fail;
}
}
data.host_addrlen = sizeof(server_addr);
#ifdef NFS_MOUNT_DEBUG
- printf("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n",
+ printf(_("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n"),
data.rsize, data.wsize, data.timeo, data.retrans);
- printf("acreg (min, max) = (%d, %d), acdir (min, max) = (%d, %d)\n",
+ printf(_("acreg (min, max) = (%d, %d), acdir (min, max) = (%d, %d)\n"),
data.acregmin, data.acregmax, data.acdirmin, data.acdirmax);
- printf("port = %d, bg = %d, retry = %d, flags = %.8x\n",
+ printf(_("port = %d, bg = %d, retry = %d, flags = %.8x\n"),
ntohs(server_addr.sin_port), bg, retry, data.flags);
- printf("soft = %d, intr = %d, nocto = %d, noac = %d, "
- "nosharecache = %d\n",
+ printf(_("soft = %d, intr = %d, nocto = %d, noac = %d, "
+ "nosharecache = %d\n"),
(data.flags & NFS4_MOUNT_SOFT) != 0,
(data.flags & NFS4_MOUNT_INTR) != 0,
(data.flags & NFS4_MOUNT_NOCTO) != 0,
if (num_flavour > 0) {
int pf_cnt, i;
- printf("sec = ");
+ printf(_("sec = "));
for (pf_cnt = 0; pf_cnt < num_flavour; pf_cnt++) {
for (i = 0; i < flav_map_size; i++) {
if (flav_map[i].fnum == pseudoflavour[pf_cnt]) {
printf("%s", (pf_cnt < num_flavour-1) ? ":" : "\n");
}
}
- printf("proto = %s\n", (data.proto == IPPROTO_TCP) ? "tcp" : "udp");
+ printf(_("proto = %s\n"), (data.proto == IPPROTO_TCP) ? _("tcp") : _("udp"));
#endif
timeout = time(NULL) + 60 * retry;
if (errno == ETIMEDOUT)
break;
default:
- mount_errors(hostname, 0, bg);
+ rpc_mount_errors(hostname, 0, bg);
goto fail;
}
t = time(NULL);
if (t >= timeout) {
- mount_errors(hostname, 0, bg);
+ rpc_mount_errors(hostname, 0, bg);
goto fail;
}
- mount_errors(hostname, 1, bg);
+ rpc_mount_errors(hostname, 1, bg);
continue;
}
}
}
- return 0;
+ return EX_SUCCESS;
fail:
return retval;