Accepting request 415078 from home:jloeser:branches:devel:libraries:c_c++

fix for opening RTAS error injection facility (bsc#985643)

OBS-URL: https://build.opensuse.org/request/show/415078
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/librtas?expand=0&rev=41
This commit is contained in:
Ismail Dönmez 2016-07-26 07:29:50 +00:00 committed by Git OBS Bridge
parent 5897227aa6
commit 48901a8c30
4 changed files with 44 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#
# spec file for package librtas-doc
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed

View File

@ -0,0 +1,32 @@
@@ -, +, @@
---
librtas_src/syscall_calls.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Index: librtas-2.0.0/librtas_src/syscall_calls.c
===================================================================
--- librtas-2.0.0.orig/librtas_src/syscall_calls.c
+++ librtas-2.0.0/librtas_src/syscall_calls.c
@@ -466,15 +466,20 @@ int rtas_errinjct_close(int otoken)
*/
int rtas_errinjct_open(int *otoken)
{
- __be32 be_otoken;
+ __be32 be_status;
int rc, status;
rc = sanity_check();
if (rc)
return rc;
- rc = rtas_call("ibm,open-errinjct", 0, 2, &be_otoken, &status);
- *otoken = be32toh(be_otoken);
+ /*
+ * Unlike other RTAS calls, here first output parameter is otoken,
+ * not status. rtas_call converts otoken to host endianess. We
+ * have to convert status parameter.
+ */
+ rc = rtas_call("ibm,open-errinjct", 0, 2, otoken, &be_status);
+ status = be32toh(be_status);
dbg("(%p) = %d, %d\n", otoken, rc ? rc : status, *otoken);
return rc ? rc : status;

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Jul 25 12:37:58 UTC 2016 - jloeser@suse.com
- fix for opening RTAS error injection facility (bsc#985643)
- added patches:
* librtas.bug-985643_open_RTAS_error_facility.patch
-------------------------------------------------------------------
Mon Jun 27 11:32:47 UTC 2016 - normand@linux.vnet.ibm.com

View File

@ -1,7 +1,7 @@
#
# spec file for package librtas
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -30,6 +30,7 @@ Url: https://github.com/nfont/librtas
Source0: %{name}-%{version}.tar.gz
Source1: baselibs.conf
Patch: librtas-failedmagic.patch
Patch1: librtas.bug-985643_open_RTAS_error_facility.patch
%description
The librtas shared library provides userspace with an interface through
@ -74,6 +75,7 @@ contents of RTAS events.
%prep
%setup -q
%patch
%patch1 -p1
%build
make CFLAGS="%optflags -fPIC -g -I $PWD/librtasevent_src" LIB_DIR="%{_libdir}" %{?_smp_mflags}