|
|
dbeef3 |
From 338d5f2876c54e5d811100ba816d3a6dec00ab11 Mon Sep 17 00:00:00 2001
|
|
|
dbeef3 |
From: Karel Zak <kzak@redhat.com>
|
|
|
dbeef3 |
Date: Fri, 29 Apr 2022 10:11:49 +0200
|
|
|
dbeef3 |
Subject: lsirq: improve --sort IRQ
|
|
|
dbeef3 |
|
|
|
dbeef3 |
IRQ column mixes numbers and text, it seems better to use strverscmp()
|
|
|
dbeef3 |
rather than classic strcmp().
|
|
|
dbeef3 |
|
|
|
dbeef3 |
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2078787
|
|
|
dbeef3 |
Upstream: http://github.com/util-linux/util-linux/commit/d382861c0815ff241fb2844a2a896f0fb1c7b73e
|
|
|
dbeef3 |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
dbeef3 |
---
|
|
|
dbeef3 |
sys-utils/irq-common.c | 2 +-
|
|
|
dbeef3 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
dbeef3 |
|
|
|
dbeef3 |
diff --git a/sys-utils/irq-common.c b/sys-utils/irq-common.c
|
|
|
dbeef3 |
index 350675394..22080b96d 100644
|
|
|
dbeef3 |
--- a/sys-utils/irq-common.c
|
|
|
dbeef3 |
+++ b/sys-utils/irq-common.c
|
|
|
dbeef3 |
@@ -371,7 +371,7 @@ static inline int cmp_delta(const struct irq_info *a,
|
|
|
dbeef3 |
static inline int cmp_interrupts(const struct irq_info *a,
|
|
|
dbeef3 |
const struct irq_info *b)
|
|
|
dbeef3 |
{
|
|
|
dbeef3 |
- return (strcmp(a->irq, b->irq) > 0) ? 1 : 0;
|
|
|
dbeef3 |
+ return (strverscmp(a->irq, b->irq) > 0) ? 1 : 0;
|
|
|
dbeef3 |
}
|
|
|
dbeef3 |
|
|
|
dbeef3 |
static void sort_result(struct irq_output *out,
|
|
|
dbeef3 |
--
|
|
|
dbeef3 |
2.36.1
|
|
|
dbeef3 |
|