diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-19 11:54:02 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-19 11:54:02 +0000 |
commit | e2e56c7c4129de7d20df42e8239fd304c81ef29b (patch) | |
tree | 0f9eb8281fac2f87c79a888dac49b27a1965b366 /util-linux/nfsmount.c | |
parent | e3c150bc67cb158ee854ffb498f0066c79cd842c (diff) | |
download | busybox-w32-e2e56c7c4129de7d20df42e8239fd304c81ef29b.tar.gz busybox-w32-e2e56c7c4129de7d20df42e8239fd304c81ef29b.tar.bz2 busybox-w32-e2e56c7c4129de7d20df42e8239fd304c81ef29b.zip |
- 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 '')
-rw-r--r-- | util-linux/nfsmount.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c index be0c87f71..7b742cb5f 100644 --- a/util-linux/nfsmount.c +++ b/util-linux/nfsmount.c | |||
@@ -214,7 +214,6 @@ enum { | |||
214 | 214 | ||
215 | static char *nfs_strerror(int status); | 215 | static char *nfs_strerror(int status); |
216 | 216 | ||
217 | #define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r)) | ||
218 | #define MAX_NFSPROT ((nfs_mount_version >= 4) ? 3 : 2) | 217 | #define MAX_NFSPROT ((nfs_mount_version >= 4) ? 3 : 2) |
219 | 218 | ||
220 | enum { | 219 | enum { |
@@ -249,13 +248,13 @@ find_kernel_nfs_mount_version(void) | |||
249 | 248 | ||
250 | nfs_mount_version = NFS_MOUNT_VERSION; /* default */ | 249 | nfs_mount_version = NFS_MOUNT_VERSION; /* default */ |
251 | 250 | ||
252 | kernel_version = get_kernel_revision(); | 251 | kernel_version = get_linux_version_code(); |
253 | if (kernel_version) { | 252 | if (kernel_version) { |
254 | if (kernel_version < MAKE_VERSION(2,1,32)) | 253 | if (kernel_version < KERNEL_VERSION(2,1,32)) |
255 | nfs_mount_version = 1; | 254 | nfs_mount_version = 1; |
256 | else if (kernel_version < MAKE_VERSION(2,2,18) || | 255 | else if (kernel_version < KERNEL_VERSION(2,2,18) || |
257 | (kernel_version >= MAKE_VERSION(2,3,0) && | 256 | (kernel_version >= KERNEL_VERSION(2,3,0) && |
258 | kernel_version < MAKE_VERSION(2,3,99))) | 257 | kernel_version < KERNEL_VERSION(2,3,99))) |
259 | nfs_mount_version = 3; | 258 | nfs_mount_version = 3; |
260 | else | 259 | else |
261 | nfs_mount_version = 4; /* since 2.3.99pre4 */ | 260 | nfs_mount_version = 4; /* since 2.3.99pre4 */ |
@@ -844,7 +843,7 @@ int nfsmount(const char *spec, const char *node, int *flags, | |||
844 | * to avoid problems with multihomed hosts. | 843 | * to avoid problems with multihomed hosts. |
845 | * --Swen | 844 | * --Swen |
846 | */ | 845 | */ |
847 | if (get_kernel_revision() <= 66314 | 846 | if (get_linux_version_code() <= KERNEL_VERSION(2,3,10) |
848 | && connect(fsock, (struct sockaddr *) &server_addr, | 847 | && connect(fsock, (struct sockaddr *) &server_addr, |
849 | sizeof (server_addr)) < 0) { | 848 | sizeof (server_addr)) < 0) { |
850 | perror(_("nfs connect")); | 849 | perror(_("nfs connect")); |