42 lines
1.0 KiB
Diff
42 lines
1.0 KiB
Diff
|
From 5d9eb1987ca8ae895bd2e2cf585954f50d3544ae Mon Sep 17 00:00:00 2001
|
||
|
From: Tao Liu <ltao@redhat.com>
|
||
|
Date: Tue, 13 Aug 2024 10:30:56 +1200
|
||
|
Subject: [PATCH 40/44] Version option should return 0 rather than 1
|
||
|
|
||
|
Previously invoke irqbalance with --version options, the return value
|
||
|
is 1 instead of 0:
|
||
|
|
||
|
$ irqbalance --version
|
||
|
irqbalance version 1.9.4
|
||
|
$ echo $?
|
||
|
1
|
||
|
|
||
|
It is unexpected because irqbalance have successfully returned the
|
||
|
version string with no errors, so 0 should be returned instead of 1.
|
||
|
This will confuse some automation tests.
|
||
|
|
||
|
This patch will make irqbalance return the correct value for version
|
||
|
option.
|
||
|
|
||
|
Signed-off-by: Tao Liu <ltao@redhat.com>
|
||
|
---
|
||
|
irqbalance.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/irqbalance.c b/irqbalance.c
|
||
|
index 491a912..6422a7b 100644
|
||
|
--- a/irqbalance.c
|
||
|
+++ b/irqbalance.c
|
||
|
@@ -122,7 +122,7 @@ static void parse_command_line(int argc, char **argv)
|
||
|
break;
|
||
|
case 'V':
|
||
|
version();
|
||
|
- exit(1);
|
||
|
+ exit(0);
|
||
|
break;
|
||
|
case 'c':
|
||
|
deepest_cache = strtoul(optarg, &endptr, 10);
|
||
|
--
|
||
|
2.47.0
|
||
|
|