irq: skip FIQ line in /proc/interrupts
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 2 Aug 2015 18:54:51 +0000 (20:54 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Mon, 3 Aug 2015 21:12:51 +0000 (23:12 +0200)
/proc/interrupts on my Raspberry PI contains:
FIQ:              usb_fiq

This line doesn't contain any per cpu counters
but we try to parse it anyway, resulting in:
parse_value: Failed to parse string as derive: usb_fiq.

Fixes #971

src/irq.c

index 1168b97..6afacf0 100644 (file)
--- a/src/irq.c
+++ b/src/irq.c
@@ -155,6 +155,10 @@ static int irq_read (void)
                if (irq_name[irq_name_len - 1] != ':')
                        continue;
 
+               /* Is it the the ARM fast interrupt (FIQ)? */
+               if (irq_name_len == 4 && (strncmp(irq_name, "FIQ:", 4) == 0))
+                       continue;
+
                irq_name[irq_name_len - 1] = 0;
                irq_name_len--;