aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-04-17 23:02:57 +0000
committerRob Landley <rob@landley.net>2006-04-17 23:02:57 +0000
commit29ba9796be92ccd1250b6c5c3e7906bebed15838 (patch)
tree89ba84bf4cb356219585649b2cc1127534540a82 /util-linux
parent0edbad1a7c8a83dc5584796185d922116951f8f3 (diff)
downloadbusybox-w32-29ba9796be92ccd1250b6c5c3e7906bebed15838.tar.gz
busybox-w32-29ba9796be92ccd1250b6c5c3e7906bebed15838.tar.bz2
busybox-w32-29ba9796be92ccd1250b6c5c3e7906bebed15838.zip
Robert Eggers noticed that nfsmount would sometimes incorrectly return success.
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/nfsmount.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c
index a98c8f8ae..be0c87f71 100644
--- a/util-linux/nfsmount.c
+++ b/util-linux/nfsmount.c
@@ -572,13 +572,9 @@ int nfsmount(const char *spec, const char *node, int *flags,
572 if (nfs_mount_version >= 3) 572 if (nfs_mount_version >= 3)
573 data.flags |= (nolock ? NFS_MOUNT_NONLM : 0); 573 data.flags |= (nolock ? NFS_MOUNT_NONLM : 0);
574#endif 574#endif
575 if (nfsvers > MAX_NFSPROT) { 575 if (nfsvers > MAX_NFSPROT || mountvers > MAX_NFSPROT) {
576 bb_error_msg("NFSv%d not supported!", nfsvers); 576 bb_error_msg("NFSv%d not supported!", nfsvers);
577 return 0; 577 return 1;
578 }
579 if (mountvers > MAX_NFSPROT) {
580 bb_error_msg("NFSv%d not supported!", nfsvers);
581 return 0;
582 } 578 }
583 if (nfsvers && !mountvers) 579 if (nfsvers && !mountvers)
584 mountvers = (nfsvers < 3) ? 1 : nfsvers; 580 mountvers = (nfsvers < 3) ? 1 : nfsvers;