Correct the parameter handling of ppc64_cpu when setting the run-mode
This commit is contained in:
parent
61d6aaedeb
commit
e96140f3a0
42
powerpc-utils-run_mode.patch
Normal file
42
powerpc-utils-run_mode.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
This patch corrects the parameter handling of ppc64_cpu when setting the
|
||||||
|
run-mode. The PAPR specifies that the rtas_[get|set]_system_parameter calls
|
||||||
|
take a char buffer, but for the run mode it actually wants integer values in
|
||||||
|
the buffer, not strings. This updates the handling of the values to be
|
||||||
|
integers.
|
||||||
|
|
||||||
|
This patch also add an additional error message to indicate failure when a
|
||||||
|
partition is not authorized to set the run mode.
|
||||||
|
|
||||||
|
Signed-off-by:Nathan Fontenot <nfont@austin.ibm.com>
|
||||||
|
---
|
||||||
|
|
||||||
|
Index: powerpc-utils-1.2.2/src/ppc64_cpu.c
|
||||||
|
===================================================================
|
||||||
|
--- powerpc-utils-1.2.2.orig/src/ppc64_cpu.c 2010-06-10 13:22:02.000000000 -0500
|
||||||
|
+++ powerpc-utils-1.2.2/src/ppc64_cpu.c 2010-06-10 13:33:09.810455522 -0500
|
||||||
|
@@ -416,11 +416,11 @@
|
||||||
|
printf("Could not retrieve current diagnostics "
|
||||||
|
"mode\n");
|
||||||
|
} else
|
||||||
|
- printf("run-mode=%c\n", mode[2]);
|
||||||
|
+ printf("run-mode=%d\n", mode[2]);
|
||||||
|
} else {
|
||||||
|
- signed char rmode = *run_mode;
|
||||||
|
+ short rmode = atoi(run_mode);
|
||||||
|
|
||||||
|
- if (rmode < '0' || rmode > '3') {
|
||||||
|
+ if (rmode < 0 || rmode > 3) {
|
||||||
|
printf("Invalid run-mode=%c\n", rmode);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
@@ -433,6 +433,9 @@
|
||||||
|
if (rc == -3)
|
||||||
|
printf("Machine does not support diagnostic "
|
||||||
|
"run mode\n");
|
||||||
|
+ else if (rc == -9002)
|
||||||
|
+ printf("Machine is not authorized to set "
|
||||||
|
+ "diagnostic run mode\n");
|
||||||
|
else
|
||||||
|
printf("Could not set diagnostics mode\n");
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: powerpc-utils
|
Name: powerpc-utils
|
||||||
Version: 1.2.2
|
Version: 1.2.2
|
||||||
Release: 10%{?dist}
|
Release: 11%{?dist}
|
||||||
Summary: Utilities for PowerPC platforms
|
Summary: Utilities for PowerPC platforms
|
||||||
|
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
@ -45,6 +45,8 @@ Patch9: powerpc-utils-cpudscr.patch
|
|||||||
# 599719, Correct cpu dlpar capable check
|
# 599719, Correct cpu dlpar capable check
|
||||||
Patch10: powerpc-utils-cpu_dlpar_check.patch
|
Patch10: powerpc-utils-cpu_dlpar_check.patch
|
||||||
|
|
||||||
|
# Corrects the parameter handling of ppc64_cpu when setting the run-mode
|
||||||
|
Patch11: powerpc-utils-run_mode.patch
|
||||||
|
|
||||||
# This is done before release of F12
|
# This is done before release of F12
|
||||||
Obsoletes: powerpc-utils-papr < 1.1.6-3
|
Obsoletes: powerpc-utils-papr < 1.1.6-3
|
||||||
@ -70,7 +72,7 @@ Utilities for PowerPC platforms.
|
|||||||
%patch8 -p1 -b .threads
|
%patch8 -p1 -b .threads
|
||||||
%patch9 -p1 -b .cpudscr
|
%patch9 -p1 -b .cpudscr
|
||||||
%patch10 -p1 -b .cpu_dlpar_check
|
%patch10 -p1 -b .cpu_dlpar_check
|
||||||
|
%patch11 -p1 -b .run_mode
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
@ -153,6 +155,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%preun
|
%preun
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 15 2010 Roman Rakus <rrakus@redhat.com> - 1.2.2-11
|
||||||
|
- Correct the parameter handling of ppc64_cpu when setting the run-mode
|
||||||
|
|
||||||
* Wed Jun 09 2010 Roman Rakus <rrakus@redhat.com> - 1.2.2-10
|
* Wed Jun 09 2010 Roman Rakus <rrakus@redhat.com> - 1.2.2-10
|
||||||
- Added some upstream patches
|
- Added some upstream patches
|
||||||
- also bump release
|
- also bump release
|
||||||
|
Loading…
Reference in New Issue
Block a user