sysstat/sysstat-8.0.4-cpu.patch

14 lines
546 B
Diff
Raw Normal View History

diff -up sysstat-8.0.4/common.c.pom sysstat-8.0.4/common.c
--- sysstat-8.0.4/common.c.pom 2008-01-01 10:26:31.000000000 +0100
+++ sysstat-8.0.4/common.c 2008-04-23 10:23:46.000000000 +0200
@@ -129,6 +129,9 @@ int get_sys_cpu_nr(void)
while ((drd = readdir(dir)) != NULL) {
if (!strncmp(drd->d_name, "cpu", 3)) {
+ /* filter out entries like cpuidle/ */
+ if (!isdigit(drd->d_name[3]))
+ continue;
snprintf(line, MAX_PF_NAME, "%s/%s", SYSFS_DEVCPU, drd->d_name);
line[MAX_PF_NAME - 1] = '\0';
if (stat(line, &buf) < 0)