From 8b4b5a75f2ebdfbc6580c60053b18280444cd0b52480e23fd26a4e62c5cbe564 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Fri, 1 Jul 2022 10:00:47 +0000 Subject: [PATCH] Accepting request 985317 from home:Andreas_Schwab:Factory - proc-interrupts.patch: parse_proc_interrupts: fix parsing interrupt counts OBS-URL: https://build.opensuse.org/request/show/985317 OBS-URL: https://build.opensuse.org/package/show/Base:System/irqbalance?expand=0&rev=95 --- irqbalance.changes | 6 ++++++ irqbalance.spec | 1 + proc-interrupts.patch | 26 ++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 proc-interrupts.patch diff --git a/irqbalance.changes b/irqbalance.changes index 2b92f53..41a11ca 100644 --- a/irqbalance.changes +++ b/irqbalance.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 27 12:52:42 UTC 2022 - Andreas Schwab + +- proc-interrupts.patch: parse_proc_interrupts: fix parsing interrupt + counts + ------------------------------------------------------------------- Wed Sep 08 09:59:35 UTC 2021 - trenn@suse.de diff --git a/irqbalance.spec b/irqbalance.spec index b606f43..ca03283 100644 --- a/irqbalance.spec +++ b/irqbalance.spec @@ -31,6 +31,7 @@ URL: https://github.com/Irqbalance/irqbalance Source: %{name}-%{version}.tar.gz Source3: sysconfig.irqbalance Patch1: Set-fd-limit.patch +Patch2: proc-interrupts.patch BuildRequires: libcap-ng-devel BuildRequires: libtool BuildRequires: ncurses-devel diff --git a/proc-interrupts.patch b/proc-interrupts.patch new file mode 100644 index 0000000..f761291 --- /dev/null +++ b/proc-interrupts.patch @@ -0,0 +1,26 @@ +From 0a82dddbaf5702caded0d0d83a6eafaca743254d Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Mon, 27 Jun 2022 13:43:04 +0200 +Subject: [PATCH] parse_proc_interrupts: fix parsing interrupt counts + +The name of an interrupt chip can start with a number, stop before it. +--- + procinterrupts.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/procinterrupts.c b/procinterrupts.c +index 57c8801..d90bf6d 100644 +--- a/procinterrupts.c ++++ b/procinterrupts.c +@@ -331,7 +331,7 @@ void parse_proc_interrupts(void) + while (1) { + uint64_t C; + C = strtoull(c, &c2, 10); +- if (c==c2) /* end of numbers */ ++ if (c==c2 || !strchr(" \t", *c2)) /* end of numbers */ + break; + count += C; + c=c2; +-- +2.35.3 +