Extend commit 25680305095bfcedaa46cb017182544183ab743b to the whole cpu object.
authorCesare Tirabassi <norsetto@ubuntu.com>
Sun, 31 Jan 2010 10:57:09 +0000 (11:57 +0100)
committerCesare Tirabassi <norsetto@ubuntu.com>
Sun, 31 Jan 2010 11:00:29 +0000 (12:00 +0100)
This is still a workaround, the underlining starvation issue remains
unsolved.
(cherry picked from commit 99fd8ef38080a873bee67cd7742e5c67048aeb63)

src/conky.c

index d31698f..50cbb2a 100644 (file)
@@ -898,12 +898,12 @@ void generate_text_internal(char *p, int p_max_size,
                                print_cmdline_to_pid(obj, p, p_max_size);
                        }
                        OBJ(cpu) {
-                               if (obj->data.i > info.cpu_count) {
-                                       NORM_ERR("obj->data.i %i info.cpu_count %i",
-                                                       obj->data.i, info.cpu_count);
-                                       CRIT_ERR(NULL, NULL, "attempting to use more CPUs than you have!");
-                               }
                                if (cur->cpu_usage) {
+                                       if (obj->data.i > info.cpu_count) {
+                                               NORM_ERR("obj->data.i %i info.cpu_count %i",
+                                                               obj->data.i, info.cpu_count);
+                                               CRIT_ERR(NULL, NULL, "attempting to use more CPUs than you have!");
+                                       }
                                    percent_print(p, p_max_size,
                                              round_to_int(cur->cpu_usage[obj->data.i] * 100.0));
                                }