aboutsummaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
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)
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 */