summaryrefslogtreecommitdiff
path: root/util-linux/nfsmount.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2006-05-19 11:54:02 +0000
committerBernhard Reutner-Fischer2006-05-19 11:54:02 +0000
commite2e56c7c4129de7d20df42e8239fd304c81ef29b (patch)
tree0f9eb8281fac2f87c79a888dac49b27a1965b366 /util-linux/nfsmount.c
parente3c150bc67cb158ee854ffb498f0066c79cd842c (diff)
downloadbusybox-e2e56c7c4129de7d20df42e8239fd304c81ef29b.zip
busybox-e2e56c7c4129de7d20df42e8239fd304c81ef29b.tar.gz
- single KERNEL_VERSION(a,b,c) macro in platform.h
- rename get_kernel_revision() to get_linux_version_code from Robert P. J. Day
Diffstat (limited to 'util-linux/nfsmount.c')
-rw-r--r--util-linux/nfsmount.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c
index be0c87f..7b742cb 100644
--- a/util-linux/nfsmount.c
+++ b/util-linux/nfsmount.c
@@ -214,7 +214,6 @@ enum {
static char *nfs_strerror(int status);
-#define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r))
#define MAX_NFSPROT ((nfs_mount_version >= 4) ? 3 : 2)
enum {
@@ -249,13 +248,13 @@ find_kernel_nfs_mount_version(void)
nfs_mount_version = NFS_MOUNT_VERSION; /* default */
- kernel_version = get_kernel_revision();
+ kernel_version = get_linux_version_code();
if (kernel_version) {
- if (kernel_version < MAKE_VERSION(2,1,32))
+ if (kernel_version < KERNEL_VERSION(2,1,32))
nfs_mount_version = 1;
- else if (kernel_version < MAKE_VERSION(2,2,18) ||
- (kernel_version >= MAKE_VERSION(2,3,0) &&
- kernel_version < MAKE_VERSION(2,3,99)))
+ else if (kernel_version < KERNEL_VERSION(2,2,18) ||
+ (kernel_version >= KERNEL_VERSION(2,3,0) &&
+ kernel_version < KERNEL_VERSION(2,3,99)))
nfs_mount_version = 3;
else
nfs_mount_version = 4; /* since 2.3.99pre4 */
@@ -844,7 +843,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
* to avoid problems with multihomed hosts.
* --Swen
*/
- if (get_kernel_revision() <= 66314
+ if (get_linux_version_code() <= KERNEL_VERSION(2,3,10)
&& connect(fsock, (struct sockaddr *) &server_addr,
sizeof (server_addr)) < 0) {
perror(_("nfs connect"));