Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-10-30 20:22:04 +0300
committerEric Andersen <andersen@codepoet.org>2000-10-30 20:22:04 +0300
commitef936da7c5608c8cae553216f8661764247c2819 (patch)
treed7531d36a1dcd27c47d26707170c4711b0c73aae /utility.c
parent3e07541e5fec215e2d61deb48e3dc1bb460babd1 (diff)
Fix uname problem that was breaking poweroff.
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/utility.c b/utility.c
index d61ef30e1..235b58227 100644
--- a/utility.c
+++ b/utility.c
@@ -156,7 +156,9 @@ extern int get_kernel_revision(void)
perror("cannot get system information");
return (0);
}
- sscanf(name.version, "%d.%d.%d", &major, &minor, &patch);
+ major = atoi(strtok(name.release, "."));
+ minor = atoi(strtok(NULL, "."));
+ patch = atoi(strtok(NULL, "."));
return major * 65536 + minor * 256 + patch;
}
#endif /* BB_INIT */