Resolves: RHEL-81987, Fix return value for success from do_replace()

This commit is contained in:
Than Ngo 2025-04-22 19:53:10 +02:00
parent 6bf4958b42
commit 2a575e2702
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,31 @@
commit 3a8127ad7fe6615a8c6e8a3f0965addfdf888b38
Author: Haren Myneni <haren@linux.ibm.com>
Date: Fri Feb 14 21:43:33 2025 -0800
drmgr/pci: Return 0 for success from do_replace()
Added replace_add_work() in commit f40a63b15c563 to support
replacement node and the partner node. But this function returns
0 for user input and 1 for success which caused do_replace()
returns 1. This patch fixes the problem with return 0.
Fixes: f40a63b15c563 ("drmgr/pci: Add multipath partner device support for hotplug replace")
Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
diff --git a/src/drmgr/drslot_chrp_pci.c b/src/drmgr/drslot_chrp_pci.c
index 4c41fcd..91c08e9 100644
--- a/src/drmgr/drslot_chrp_pci.c
+++ b/src/drmgr/drslot_chrp_pci.c
@@ -1051,9 +1051,10 @@ static int do_replace(struct dr_node *all_nodes)
}
usr_prompt = prompt_save;
+ return rc;
}
- return rc;
+ return 0;
}
int valid_pci_options(void)

View File

@ -1,6 +1,6 @@
Name: powerpc-utils
Version: 1.3.13
Release: 2%{?dist}
Release: 3%{?dist}
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
License: GPL-2.0-only
@ -12,6 +12,7 @@ Patch0: powerpc-utils-1.3.11-manpages.patch
# upstream patches
Patch100: powerpc-utils-1.3.13-cpu_info_helpers.patch
Patch101: powerpc-utils-1.3.13-ppc64_cpu-Fix-handling-of-non-contiguous-CPU-IDs.patch
Patch102: powerpc-utils-1.3.13-drmgr-return.patch
ExclusiveArch: ppc %{power64}
@ -213,6 +214,9 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || :
%changelog
* Tue Apr 22 2025 Than Ngo <than@redhat.com> - 1.3.13-3
- Resolves: RHEL-81987, Fix return value for success from do_replace()
* Sat Feb 01 2025 Than Ngo <than@redhat.com> - 1.3.13-2
- Resolves: RHEL-76285, Fix handling of non-contiguous CPU IDs