sscanf(strchr(line, ':') + 1, "%u", &proc_nb);
}
- else if (!strncmp(line, "cpu MHz\t", 8)) {
++ /* Entry in /proc/cpuinfo is different between Intel and Power architectures */
+ else if (!strncmp(line, "cpu MHz\t", 8) ||
+ !strncmp(line, "clock\t", 6)) {
-
- if (strstr(line, "MHz"))
- sscanf(strchr(line, ':') + 1, "%u.%uMHz", &ifreq, &dfreq);
- else
- sscanf(strchr(line, ':') + 1, "%u.%u", &ifreq, &dfreq);
-
+ sscanf(strchr(line, ':') + 1, "%u.%u", &ifreq, &dfreq);
if (proc_nb < (nbr - 1)) {
/* Save current CPU frequency */