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 /utility.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 'utility.c')
-rw-r--r-- | utility.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -156,7 +156,9 @@ extern int get_kernel_revision(void) | |||
156 | perror("cannot get system information"); | 156 | perror("cannot get system information"); |
157 | return (0); | 157 | return (0); |
158 | } | 158 | } |
159 | sscanf(name.version, "%d.%d.%d", &major, &minor, &patch); | 159 | major = atoi(strtok(name.release, ".")); |
160 | minor = atoi(strtok(NULL, ".")); | ||
161 | patch = atoi(strtok(NULL, ".")); | ||
160 | return major * 65536 + minor * 256 + patch; | 162 | return major * 65536 + minor * 256 + patch; |
161 | } | 163 | } |
162 | #endif /* BB_INIT */ | 164 | #endif /* BB_INIT */ |