Dominique Leuenberger 2022-07-02 13:33:43 +00:00 committed by Git OBS Bridge
commit 3a79e38467
3 changed files with 33 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jun 27 12:52:42 UTC 2022 - Andreas Schwab <schwab@suse.de>
- proc-interrupts.patch: parse_proc_interrupts: fix parsing interrupt
counts
-------------------------------------------------------------------
Wed Sep 08 09:59:35 UTC 2021 - trenn@suse.de

View File

@ -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

26
proc-interrupts.patch Normal file
View File

@ -0,0 +1,26 @@
From 0a82dddbaf5702caded0d0d83a6eafaca743254d Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
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