Hello community,

here is the log from the commit of package librtas for openSUSE:Factory checked 
in at 2014-03-06 12:01:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/librtas (Old)
 and      /work/SRC/openSUSE:Factory/.librtas.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "librtas"

Changes:
--------
--- /work/SRC/openSUSE:Factory/librtas/librtas.changes  2013-12-09 
19:11:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.librtas.new/librtas.changes     2014-03-06 
12:01:29.000000000 +0100
@@ -1,0 +2,11 @@
+Tue Mar  4 14:57:14 UTC 2014 - [email protected]
+
+- change license to CPL-1.0 (see COPYRIGHT) 
+
+-------------------------------------------------------------------
+Tue Mar  4 12:53:20 UTC 2014 - [email protected]
+
+- version update to 1.3.9 (BNC#866674) 
+  see changelog for changes 
+
+-------------------------------------------------------------------

Old:
----
  librtas-1.3.8.tar.gz

New:
----
  librtas-1.3.9.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ librtas.spec ++++++
--- /var/tmp/diff_new_pack.rIWbSH/_old  2014-03-06 12:01:31.000000000 +0100
+++ /var/tmp/diff_new_pack.rIWbSH/_new  2014-03-06 12:01:31.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package librtas
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 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
@@ -18,11 +18,11 @@
 
 Name:           librtas
 BuildRequires:  doxygen
-Version:        1.3.8
+Version:        1.3.9
 Release:        0
 BuildRequires:  fdupes
 Summary:        Libraries to provide access to RTAS calls and RTAS events
-License:        IPL-1.0
+License:        CPL-1.0
 Group:          System/Libraries
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 ExclusiveArch:  ppc ppc64 ppc64le
@@ -122,6 +122,7 @@
 
 %files doc
 %defattr(-, root, root)
+%doc COPYRIGHT
 %doc %{_docdir}/librtas 
 
 %changelog

++++++ librtas-1.3.8.tar.gz -> librtas-1.3.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-1.3.8/Changelog new/librtas-1.3.9/Changelog
--- old/librtas-1.3.8/Changelog 2013-01-31 19:30:53.000000000 +0100
+++ new/librtas-1.3.9/Changelog 2014-03-03 21:25:01.000000000 +0100
@@ -1,3 +1,42 @@
+Changelog for librtas-1.3.9
+=======================================
+commit 9c5bccb93aa734796df111c2e7c051860b8b30de
+Author: Signed-off-by: Greg Kurz <[email protected]>
+Date:   Fri Feb 28 07:49:59 2014 -0600
+
+    librtas, libofdt: fix endianness issues when accessing the device tree
+    
+    Signed-off-by: Greg Kurz <[email protected]>
+
+commit 399a1962534342c1a153445b587d3fd0c95cfc78
+Merge: e2de13f a057c98
+Author: Nathan Fontenot <[email protected]>
+Date:   Wed Feb 26 08:22:33 2014 -0600
+
+    Merge branch 'master' of ssh://[email protected]/p/librtas/code
+
+commit e2de13f77b36aff9d55d97ec862261a329262d4a
+Author: Tyrel Datwyler <[email protected]>
+Date:   Tue Feb 25 10:09:54 2014 -0600
+
+    librtasevent: Add hotplug event implementation
+    
+    Add event definition and helper functions for hotplug events. This is
+    intended for qemu to notify a pseries guest of a hotplug event.
+    
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit a057c984394ac5c0a043ecc250073b8606cd38a1
+Author: Tyrel Datwyler <[email protected]>
+Date:   Tue Feb 25 10:09:54 2014 -0600
+
+    librtasevent: Add hotplug event implementation
+    
+    Add event definition and helper functions for hotplug events. This is
+    intended for qemu to notify a pseries guest of a hotplug event.
+    
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
 Changelog for librtas-1.3.8
 =======================================
 commit cd1868315f728ea5e8399df5fb7689a88870d7da
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-1.3.8/libofdt_src/drc.c 
new/librtas-1.3.9/libofdt_src/drc.c
--- old/librtas-1.3.8/libofdt_src/drc.c 2013-01-31 19:30:53.000000000 +0100
+++ new/librtas-1.3.9/libofdt_src/drc.c 2014-03-03 21:25:01.000000000 +0100
@@ -12,8 +12,19 @@
 #include <string.h>
 #include <dirent.h>
 #include <stdint.h>
+#include <endian.h>
+#include <byteswap.h>
 #include "common.h"
 
+static inline unsigned int ofdt_swap_int(unsigned int data)
+{
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+       return bswap_32(data);
+#else
+       return data;
+#endif
+}
+
 /**
  * get_property
  * @brief retrieve a device-tree property from /proc
@@ -89,7 +100,7 @@
                return -1;
        }
 
-       prop->n_entries = *(uint *)prop->_data;
+       prop->n_entries = ofdt_swap_int(*(uint *)prop->_data);
        prop->val = prop->_data + sizeof(uint);
 
        return 0;
@@ -277,6 +288,7 @@
                          sizeof(drc_index));
        if (rc)
                return;
+       drc_index = ofdt_swap_int(drc_index);
 
        for (drc = drc_list; drc; drc = drc->next) {
                if (drc_index == drc->index)
Files old/librtas-1.3.8/libofdt_src/libofdt.so.1.3.6 and 
new/librtas-1.3.9/libofdt_src/libofdt.so.1.3.6 differ
Files old/librtas-1.3.8/libofdt_src/libofdt.so.1.3.8 and 
new/librtas-1.3.9/libofdt_src/libofdt.so.1.3.8 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-1.3.8/librtas.spec.in 
new/librtas-1.3.9/librtas.spec.in
--- old/librtas-1.3.8/librtas.spec.in   2013-01-31 19:30:53.000000000 +0100
+++ new/librtas-1.3.9/librtas.spec.in   2014-03-03 21:25:01.000000000 +0100
@@ -1,5 +1,5 @@
 %define name librtas
-%define version 1.3.8
+%define version 1.3.9
 %define release 1
 Summary: Libraries to provide access to RTAS calls and RTAS events.
 Name: %{name}
Files old/librtas-1.3.8/librtas_src/librtas.so.1.3.6 and 
new/librtas-1.3.9/librtas_src/librtas.so.1.3.6 differ
Files old/librtas-1.3.8/librtas_src/librtas.so.1.3.7 and 
new/librtas-1.3.9/librtas_src/librtas.so.1.3.7 differ
Files old/librtas-1.3.8/librtas_src/librtas.so.1.3.8 and 
new/librtas-1.3.9/librtas_src/librtas.so.1.3.8 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-1.3.8/librtas_src/ofdt.c 
new/librtas-1.3.9/librtas_src/ofdt.c
--- old/librtas-1.3.8/librtas_src/ofdt.c        2013-01-31 19:30:53.000000000 
+0100
+++ new/librtas-1.3.9/librtas_src/ofdt.c        2014-03-03 21:25:01.000000000 
+0100
@@ -12,6 +12,8 @@
 #include <unistd.h>
 #include <string.h>
 #include <errno.h>
+#include <endian.h>
+#include <byteswap.h>
 #include "librtas.h"
 #include "common.h"
 
@@ -95,7 +97,11 @@
        if (rc < 0) 
                return RTAS_UNKNOWN_OP;
 
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+       rc = bswap_32(*(int *)prop_buf);
+#else
        rc = *(int *)prop_buf;
+#endif
        free(prop_buf);
 
        return rc;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-1.3.8/librtasevent_src/Makefile 
new/librtas-1.3.9/librtasevent_src/Makefile
--- old/librtas-1.3.8/librtasevent_src/Makefile 2013-01-31 19:30:53.000000000 
+0100
+++ new/librtas-1.3.9/librtasevent_src/Makefile 2014-03-03 21:25:01.000000000 
+0100
@@ -12,7 +12,7 @@
 
 LIBRE_OBJS = get_rtas_event.o print_rtas_event.o rtas_cpu.o rtas_dump.o        
\
             rtas_epow.o rtas_io.o rtas_lri.o rtas_mem.o rtas_post.o    \
-            rtas_sp.o rtas_srcfru.o rtas_v6_misc.o rtas_vend.o
+            rtas_sp.o rtas_srcfru.o rtas_v6_misc.o rtas_vend.o rtas_hotplug.o
 
 LIBRE_HDRS = librtasevent.h librtasevent_v4.h librtasevent_v6.h
 HEADERS = $(LIBRE_HDRS) rtas_event.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-1.3.8/librtasevent_src/get_rtas_event.c 
new/librtas-1.3.9/librtasevent_src/get_rtas_event.c
--- old/librtas-1.3.8/librtasevent_src/get_rtas_event.c 2013-01-31 
19:30:53.000000000 +0100
+++ new/librtas-1.3.9/librtasevent_src/get_rtas_event.c 2014-03-03 
21:25:01.000000000 +0100
@@ -163,6 +163,8 @@
         return RTAS_PSRC_SCN;
     if (strncmp(v6hdr->id, RTAS_SSRC_SCN_ID, 2) == 0)
         return RTAS_SSRC_SCN;
+    if (strncmp(v6hdr->id, RTAS_HP_SCN_ID, 2) == 0)
+       return RTAS_HP_SCN;
 
     return -1;
 }
@@ -275,6 +277,10 @@
             case RTAS_SSRC_SCN:
                 rc = parse_src_scn(re);
                 break;
+
+           case RTAS_HP_SCN:
+               rc = parse_hotplug_scn(re);
+               break;
         
             default:
                 rc = parse_generic_v6_scn(re);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-1.3.8/librtasevent_src/librtasevent.h 
new/librtas-1.3.9/librtasevent_src/librtasevent.h
--- old/librtas-1.3.8/librtasevent_src/librtasevent.h   2013-01-31 
19:30:53.000000000 +0100
+++ new/librtas-1.3.9/librtasevent_src/librtasevent.h   2014-03-03 
21:25:01.000000000 +0100
@@ -75,8 +75,9 @@
 #define RTAS_PSRC_SCN          16
 #define RTAS_SSRC_SCN          17
 #define RTAS_GENERIC_SCN        18
+#define RTAS_HP_SCN            19
 
-#define RTAS_MAX_SCN_ID                19 
+#define RTAS_MAX_SCN_ID                20
 
 /**
  * @struct rtas_event
@@ -175,6 +176,7 @@
 #define RTAS_HDR_TYPE_PLATFORM_INFO     226
 #define RTAS_HDR_TYPE_RESOURCE_DEALLOC  227
 #define RTAS_HDR_TYPE_DUMP_NOTIFICATION 228
+#define RTAS_HDR_TYPE_HOTPLUG          229
 
     uint32_t ext_log_length:32;   /**< length in bytes */
 };
@@ -415,6 +417,8 @@
 struct rtas_mt_scn * rtas_get_mt_scn(struct rtas_event *);
 struct rtas_src_scn * rtas_get_src_scn(struct rtas_event *);
 
+struct rtas_hotplug_scn * rtas_get_hotplug_scn(struct rtas_event *);
+
 int update_os_id_scn(struct rtas_event *, const char *);
 
 /* Printing RTAS event data */
Files old/librtas-1.3.8/librtasevent_src/librtasevent.so.1.3.6 and 
new/librtas-1.3.9/librtasevent_src/librtasevent.so.1.3.6 differ
Files old/librtas-1.3.8/librtasevent_src/librtasevent.so.1.3.8 and 
new/librtas-1.3.9/librtasevent_src/librtasevent.so.1.3.8 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-1.3.8/librtasevent_src/librtasevent_v6.h 
new/librtas-1.3.9/librtasevent_src/librtasevent_v6.h
--- old/librtas-1.3.8/librtasevent_src/librtasevent_v6.h        2013-01-31 
19:30:53.000000000 +0100
+++ new/librtas-1.3.9/librtasevent_src/librtasevent_v6.h        2014-03-03 
21:25:01.000000000 +0100
@@ -43,6 +43,7 @@
 #define RTAS_SSRC_SCN_ID    "SS"
 #define RTAS_SW_SCN_ID      "SW"
 #define RTAS_UDD_SCN_ID     "UD"
+#define RTAS_HP_SCN_ID      "HP"
 
 /**
  * @struct rtas_v6_main_ascn_
@@ -352,5 +353,39 @@
     char    *data;
 };
 
+/**
+ * @struct rtas_hotplug_scn
+ * @brief RTAS version 6 Hotplug section
+ */
+struct rtas_hotplug_scn {
+    struct scn_header shdr;
+    struct rtas_v6_hdr v6hdr;
+
+    uint32_t    type:8;
+#define RTAS_HP_TYPE_CPU       1
+#define RTAS_HP_TYPE_MEMORY    2
+#define RTAS_HP_TYPE_SLOT      3
+#define RTAS_HP_TYPE_PHB       4
+#define RTAS_HP_TYPE_PCI       5
+
+    uint32_t   action:8;
+#define RTAS_HP_ACTION_ADD     1
+#define RTAS_HP_ACTION_REMOVE  2
+
+    uint32_t    identifier:8;
+#define RTAS_HP_ID_DRC_NAME    1
+#define RTAS_HP_ID_DRC_INDEX   2
+#define RTAS_HP_ID_DRC_COUNT   3
+
+    uint32_t    reserved:8;
+    union {
+        uint32_t    drc_index:32;
+        uint32_t    count:32;
+        char        drc_name[1];
+    } u1;
+};
+
+#define RE_HOTPLUG_SCN_SZ      16
+
 #endif 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-1.3.8/librtasevent_src/print_rtas_event.c 
new/librtas-1.3.9/librtasevent_src/print_rtas_event.c
--- old/librtas-1.3.8/librtasevent_src/print_rtas_event.c       2013-01-31 
19:30:53.000000000 +0100
+++ new/librtas-1.3.9/librtasevent_src/print_rtas_event.c       2014-03-03 
21:25:01.000000000 +0100
@@ -66,6 +66,7 @@
     print_re_src_scn,
     print_re_src_scn,
     print_re_generic_scn,
+    print_re_hotplug_scn
 };
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-1.3.8/librtasevent_src/rtas_event.h 
new/librtas-1.3.9/librtasevent_src/rtas_event.h
--- old/librtas-1.3.8/librtasevent_src/rtas_event.h     2013-01-31 
19:30:53.000000000 +0100
+++ new/librtas-1.3.9/librtasevent_src/rtas_event.h     2014-03-03 
21:25:01.000000000 +0100
@@ -36,6 +36,7 @@
 int parse_vend_errlog_scn(struct rtas_event *);
 int parse_generic_v6_scn(struct rtas_event *);
 void parse_mtms(struct rtas_event *, struct rtas_mtms *);
+int parse_hotplug_scn(struct rtas_event *);
 
 /* print routines */
 int print_re_hdr_scn(struct scn_header *, int);
@@ -55,6 +56,7 @@
 int print_re_mt_scn(struct scn_header *, int);
 int print_re_src_scn(struct scn_header *, int);
 int print_re_generic_scn(struct scn_header *, int);
+int print_re_hotplug_scn(struct scn_header *, int);
 
 int print_mtms(struct rtas_mtms *);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-1.3.8/librtasevent_src/rtas_hotplug.c 
new/librtas-1.3.9/librtasevent_src/rtas_hotplug.c
--- old/librtas-1.3.8/librtasevent_src/rtas_hotplug.c   1970-01-01 
01:00:00.000000000 +0100
+++ new/librtas-1.3.9/librtasevent_src/rtas_hotplug.c   2014-03-03 
21:25:01.000000000 +0100
@@ -0,0 +1,95 @@
+/**
+ * @file rtas_hotplug.c
+ * @brief RTAS version 6 Hotplug section routines
+ *
+ * Copyright (C) 2013 IBM Corporation
+ * Common Public License Version 1.0 (see COPYRIGHT)
+ *
+ * @author Tyrel Datwyler <[email protected]>
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include "librtasevent.h"
+#include "rtas_event.h"
+
+/**
+ * parse_hotplug_scn
+ *
+ */
+int
+parse_hotplug_scn(struct rtas_event *re)
+{
+    struct rtas_hotplug_scn *hotplug;
+
+    hotplug = malloc(sizeof(*hotplug));
+    if (hotplug == NULL) {
+        errno = ENOMEM;
+        return -1;
+    }
+
+    hotplug->shdr.raw_offset = re->offset;
+
+    rtas_copy(RE_SHDR_OFFSET(hotplug), re, RE_HOTPLUG_SCN_SZ);
+    add_re_scn(re, hotplug, RTAS_HP_SCN);
+
+    /* TODO: Fixup scn size when drc_name is included */
+
+    return 0;
+}
+
+/**
+ * rtas_get_hotplug_scn
+ * @brief Retrieve the Hotplug section of the RTAS Event
+ *
+ * @param re rtas_event pointer
+ * @return rtas_event_scn pointer to Hotplug section
+ */
+struct rtas_hotplug_scn *
+rtas_get_hotplug_scn(struct rtas_event *re)
+{
+    return (struct rtas_hotplug_scn *)get_re_scn(re, RTAS_HP_SCN);
+}
+
+/**
+ * print_re_hotplug_scn
+ * @brief Print the contents of a version 6 Hotplug section
+ *
+ * @param res rtas_event_scn pointer for Hotplug section
+ * @param verbosity verbose level of output
+ * @return number of bytes written
+ */
+int
+print_re_hotplug_scn(struct scn_header *shdr, int verbosity)
+{
+    struct rtas_hotplug_scn *hotplug;
+    int len = 0;
+
+    if (shdr->scn_id != RTAS_HP_SCN) {
+        errno = EFAULT;
+        return 0;
+    }
+
+    hotplug = (struct rtas_hotplug_scn *)shdr;
+
+    len += print_v6_hdr("Hotplug section", &hotplug->v6hdr, verbosity);
+    len += rtas_print(PRNT_FMT_R, "Hotplug Type:", hotplug->type);
+
+    len += rtas_print(PRNT_FMT_R, "Hotplug Action:", hotplug->action);
+
+    len += rtas_print(PRNT_FMT_R, "Hotplug Identifier:", hotplug->identifier);
+
+    if (hotplug->identifier == RTAS_HP_ID_DRC_NAME) {
+       len += rtas_print("%-20s%s", "Hotplug drc_name:", hotplug->u1.drc_name);
+    } else if (hotplug->identifier == RTAS_HP_ID_DRC_INDEX) {
+       len += rtas_print(PRNT_FMT_R, "Hotplug drc_index:", 
hotplug->u1.drc_index);
+    } else {
+       len += rtas_print(PRNT_FMT_R, "Hotplug count:", hotplug->u1.count);
+    }
+
+    len += rtas_print("\n");
+    return len;
+}

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to