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