Fix uname problem that was breaking poweroff.

This commit is contained in:
Eric Andersen
2000-10-30 17:22:04 +00:00
parent 3e07541e5f
commit ef936da7c5
6 changed files with 19 additions and 65 deletions

View File

@@ -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 */