Robert Eggers noticed that nfsmount would sometimes incorrectly return success.
This commit is contained in:
parent
0edbad1a7c
commit
29ba9796be
@ -572,13 +572,9 @@ int nfsmount(const char *spec, const char *node, int *flags,
|
|||||||
if (nfs_mount_version >= 3)
|
if (nfs_mount_version >= 3)
|
||||||
data.flags |= (nolock ? NFS_MOUNT_NONLM : 0);
|
data.flags |= (nolock ? NFS_MOUNT_NONLM : 0);
|
||||||
#endif
|
#endif
|
||||||
if (nfsvers > MAX_NFSPROT) {
|
if (nfsvers > MAX_NFSPROT || mountvers > MAX_NFSPROT) {
|
||||||
bb_error_msg("NFSv%d not supported!", nfsvers);
|
bb_error_msg("NFSv%d not supported!", nfsvers);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
|
||||||
if (mountvers > MAX_NFSPROT) {
|
|
||||||
bb_error_msg("NFSv%d not supported!", nfsvers);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
if (nfsvers && !mountvers)
|
if (nfsvers && !mountvers)
|
||||||
mountvers = (nfsvers < 3) ? 1 : nfsvers;
|
mountvers = (nfsvers < 3) ? 1 : nfsvers;
|
||||||
|
Loading…
Reference in New Issue
Block a user