From 046ecd405dfbd85114a4ecc4bc624c82e1a2f8d0 Mon Sep 17 00:00:00 2001 From: landley Date: Mon, 17 Apr 2006 23:02:57 +0000 Subject: Robert Eggers noticed that nfsmount would sometimes incorrectly return success. git-svn-id: svn://busybox.net/trunk/busybox@14904 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- util-linux/nfsmount.c | 8 ++------ 1 file 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, if (nfs_mount_version >= 3) data.flags |= (nolock ? NFS_MOUNT_NONLM : 0); #endif - if (nfsvers > MAX_NFSPROT) { + if (nfsvers > MAX_NFSPROT || mountvers > MAX_NFSPROT) { bb_error_msg("NFSv%d not supported!", nfsvers); - return 0; - } - if (mountvers > MAX_NFSPROT) { - bb_error_msg("NFSv%d not supported!", nfsvers); - return 0; + return 1; } if (nfsvers && !mountvers) mountvers = (nfsvers < 3) ? 1 : nfsvers; -- cgit v1.2.3-55-g6feb