Go to file
Petr Holasek c4b8403e23 proc/interrupts needs more permissive parsing
When there was more than one leading spaces in the beginning of line,
irq database was forced to rebuild.

Signed-off-by: Petr Holasek <pholasek@redhat.com>
Signed-offy-by: Neil Horman <nhorman@tuxdriver.com>

---
 procinterrupts.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/procinterrupts.c b/procinterrupts.c
index d5555f2..2c1bb25 100644
--- a/procinterrupts.c
+++ b/procinterrupts.c
@@ -25,6 +25,7 @@
 #include <stdint.h>
 #include <string.h>
 #include <syslog.h>
+#include <ctype.h>

 #include "cpumask.h"
 #include "irqbalance.h"
@@ -66,7 +67,10 @@ void parse_proc_interrupts(void)
 				proc_int_has_msi = 1;

 		/* lines with letters in front are special, like NMI count. Ignore */
-		if (!(line[0]==' ' || (line[0]>='0' && line[0]<='9')))
+		c = line;
+		while (isblank(*(c++)))
+			;
+		if (!(*c>='0' && *c<='9'))
 			break;
 		c = strchr(line, ':');
 		if (!c)
--
1.7.6.4
2011-10-11 11:19:25 -04:00
misc Adding irqbalance.service systemd file for tracking 2011-09-23 11:37:25 -04:00
activate.c Add back improved affinity_hint handling 2011-10-06 13:53:07 -04:00
AUTHORS Add autotools scripts to irqbalance 2009-09-01 15:50:39 +00:00
autogen.sh setting executable permission on autogen.sh 2009-10-02 19:16:42 +00:00
bitmap.c Fix affinity_hint code. 2010-08-10 13:32:58 +00:00
bitmap.h initial import 2006-12-09 15:59:16 +00:00
cap-ng.m4 Adding missing configure files 2009-10-02 18:22:21 +00:00
ChangeLog Add autotools scripts to irqbalance 2009-09-01 15:50:39 +00:00
classify.c Adjusting load computation to be fair at all levels 2011-10-10 15:04:26 -04:00
configure.ac Add configure.ac checks to ensure presence of libnuma and libm 2011-10-10 08:54:54 -04:00
constants.h Enhance irqbalance logic to condier PCI bus topology in IRQ mapping 2011-08-01 18:25:02 +00:00
COPYING Adding missing configure files 2009-10-02 18:22:21 +00:00
cpumask.h Bump the NR_CPUS define to 4096 in irqbalance. That makes cpumask allocations 2010-07-26 18:51:35 +00:00
cputree.c Consolidate duplicated functions 2011-10-10 13:21:00 -04:00
irqbalance.1 Add back improved affinity_hint handling 2011-10-06 13:53:07 -04:00
irqbalance.c Add powersave settings 2011-10-10 15:59:15 -04:00
irqbalance.h Adding Syslog notification for powersave 2011-10-10 16:05:16 -04:00
irqlist.c Adding Syslog notification for powersave 2011-10-10 16:05:16 -04:00
Makefile.am Add new workload computation to irqbalance 2011-10-06 10:37:16 -04:00
NEWS Add autotools scripts to irqbalance 2009-09-01 15:50:39 +00:00
non-atomic.h initial import 2006-12-09 15:59:16 +00:00
numa.c Consolidate for_each_* functions 2011-10-10 12:12:45 -04:00
placement.c Add powersave settings 2011-10-10 15:59:15 -04:00
powermode.c Add powersave settings 2011-10-10 15:59:15 -04:00
procinterrupts.c proc/interrupts needs more permissive parsing 2011-10-11 11:19:25 -04:00
README Add autotools scripts to irqbalance 2009-09-01 15:50:39 +00:00
types.h Add powersave settings 2011-10-10 15:59:15 -04:00