diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-10-30 17:22:04 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-10-30 17:22:04 +0000 |
commit | ef936da7c5608c8cae553216f8661764247c2819 (patch) | |
tree | d7531d36a1dcd27c47d26707170c4711b0c73aae /util-linux/nfsmount.c | |
parent | 3e07541e5fec215e2d61deb48e3dc1bb460babd1 (diff) | |
download | busybox-w32-ef936da7c5608c8cae553216f8661764247c2819.tar.gz busybox-w32-ef936da7c5608c8cae553216f8661764247c2819.tar.bz2 busybox-w32-ef936da7c5608c8cae553216f8661764247c2819.zip |
Fix uname problem that was breaking poweroff.
Diffstat (limited to 'util-linux/nfsmount.c')
-rw-r--r-- | util-linux/nfsmount.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c index abae19afe..f8735e52c 100644 --- a/util-linux/nfsmount.c +++ b/util-linux/nfsmount.c | |||
@@ -160,20 +160,6 @@ static char *nfs_strerror(int stat); | |||
160 | #define EX_BG 256 /* retry in background (internal only) */ | 160 | #define EX_BG 256 /* retry in background (internal only) */ |
161 | 161 | ||
162 | 162 | ||
163 | static int | ||
164 | linux_version_code(void) { | ||
165 | struct utsname my_utsname; | ||
166 | int p, q, r; | ||
167 | |||
168 | if (uname(&my_utsname) == 0) { | ||
169 | p = atoi(strtok(my_utsname.release, ".")); | ||
170 | q = atoi(strtok(NULL, ".")); | ||
171 | r = atoi(strtok(NULL, ".")); | ||
172 | return MAKE_VERSION(p,q,r); | ||
173 | } | ||
174 | return 0; | ||
175 | } | ||
176 | |||
177 | /* | 163 | /* |
178 | * nfs_mount_version according to the sources seen at compile time. | 164 | * nfs_mount_version according to the sources seen at compile time. |
179 | */ | 165 | */ |
@@ -197,7 +183,7 @@ find_kernel_nfs_mount_version(void) { | |||
197 | if (kernel_version) | 183 | if (kernel_version) |
198 | return; | 184 | return; |
199 | 185 | ||
200 | kernel_version = linux_version_code(); | 186 | kernel_version = get_kernel_revision(); |
201 | 187 | ||
202 | if (kernel_version) { | 188 | if (kernel_version) { |
203 | if (kernel_version < MAKE_VERSION(2,1,32)) | 189 | if (kernel_version < MAKE_VERSION(2,1,32)) |
@@ -796,7 +782,7 @@ int nfsmount(const char *spec, const char *node, int *flags, | |||
796 | * to avoid problems with multihomed hosts. | 782 | * to avoid problems with multihomed hosts. |
797 | * --Swen | 783 | * --Swen |
798 | */ | 784 | */ |
799 | if (linux_version_code() <= 66314 | 785 | if (get_kernel_revision() <= 66314 |
800 | && connect(fsock, (struct sockaddr *) &server_addr, | 786 | && connect(fsock, (struct sockaddr *) &server_addr, |
801 | sizeof (server_addr)) < 0) { | 787 | sizeof (server_addr)) < 0) { |
802 | perror(_("nfs connect")); | 788 | perror(_("nfs connect")); |