X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fnfsmount.c;h=a9dd91764fbb7276521245885133c928640966f7;hp=ff0ff9307a9b3655f8cc360a147d89c6c53d3576;hb=5f7cc524008a7dc548a71f4c7b0d39759371a37a;hpb=3c1bb23c0379864722e79d19f74c180edcf2c36e diff --git a/utils/mount/nfsmount.c b/utils/mount/nfsmount.c index ff0ff93..a9dd917 100644 --- a/utils/mount/nfsmount.c +++ b/utils/mount/nfsmount.c @@ -479,7 +479,7 @@ static int nfsmnt_check_compat(const struct pmap *nfs_pmap, } if (mnt_pmap->pm_vers > max_mnt_vers) { - nfs_error(_("%s: NFS mount version %ld s not supported"), + nfs_error(_("%s: NFS mount version %ld is not supported"), progname, mnt_pmap->pm_vers); goto out_bad; } @@ -571,7 +571,7 @@ nfsmount(const char *spec, const char *node, int flags, #endif bg = 0; - retry = 10000; /* 10000 minutes ~ 1 week */ + retry = -1; memset(mnt_pmap, 0, sizeof(*mnt_pmap)); mnt_pmap->pm_prog = MOUNTPROG; @@ -585,9 +585,13 @@ nfsmount(const char *spec, const char *node, int flags, goto fail; if (!nfsmnt_check_compat(nfs_pmap, mnt_pmap)) goto fail; - - if (retry == 10000 && !bg) - retry = 2; /* reset for fg mounts */ + + if (retry == -1) { + if (bg) + retry = 10000; /* 10000 mins == ~1 week*/ + else + retry = 2; /* 2 min default on fg mounts */ + } #ifdef NFS_MOUNT_DEBUG printf(_("rsize = %d, wsize = %d, timeo = %d, retrans = %d\n"),