diff --git a/librtas-doc.spec b/librtas-doc.spec index 60b247c..41a58cd 100644 --- a/librtas-doc.spec +++ b/librtas-doc.spec @@ -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 diff --git a/librtas.bug-985643_open_RTAS_error_facility.patch b/librtas.bug-985643_open_RTAS_error_facility.patch new file mode 100644 index 0000000..2a153ab --- /dev/null +++ b/librtas.bug-985643_open_RTAS_error_facility.patch @@ -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; diff --git a/librtas.changes b/librtas.changes index e142e8d..7f561f9 100644 --- a/librtas.changes +++ b/librtas.changes @@ -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 diff --git a/librtas.spec b/librtas.spec index c96a1f9..0ea7047 100644 --- a/librtas.spec +++ b/librtas.spec @@ -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}