From c4b8403e2346e5fc67508f223c943c2dad074c41 Mon Sep 17 00:00:00 2001 From: Petr Holasek Date: Tue, 11 Oct 2011 11:17:51 -0400 Subject: [PATCH] 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 Signed-offy-by: Neil Horman --- 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 #include #include +#include #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 --- procinterrupts.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/procinterrupts.c b/procinterrupts.c index d5555f2..2c1bb25 100644 --- a/procinterrupts.c +++ b/procinterrupts.c @@ -25,6 +25,7 @@ #include #include #include +#include #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)