Hello community,

here is the log from the commit of package powerpc-utils for openSUSE:Factory 
checked in at 2017-10-26 18:38:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/powerpc-utils (Old)
 and      /work/SRC/openSUSE:Factory/.powerpc-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "powerpc-utils"

Thu Oct 26 18:38:57 2017 rev:85 rq:535882 version:1.3.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/powerpc-utils/powerpc-utils.changes      
2017-06-17 10:17:24.810943641 +0200
+++ /work/SRC/openSUSE:Factory/.powerpc-utils.new/powerpc-utils.changes 
2017-10-26 18:38:58.327103131 +0200
@@ -1,0 +2,20 @@
+Fri Oct 20 08:56:52 UTC 2017 - [email protected]
+
+- version update to 1.3.4 (fate#323767)
+  (see Changelog under powerpc-utils-1.3.4/Changelog)
+
+- modified patches:
+  * libvirt-service-dep.patch
+  * ofpathname_powernv.patch
+  * powerpc-utils-lsprop.patch
+  * systemd-dir.patch
+
+- deleted paches:
+  * 
powerpc-utils.bug-1039711_ofpathname-avoid-duplicate-entries-of-vFC-devices.patch
+  * 
powerpc-utils.bug-1040076_test-for-zlib-presence-at-configuration-time.patch
+  * powerpc-utils.bug-1041531_lsdevinfo-Add-support-for-vNIC-devices.patch
+  * powerpc-utils.bug-1041531_ofpathname-Add-support-for-vNIC-devices.patch
+  * powerpc-utils.bug-1042239_lsslot-Rectify-usr_drc_name-check.patch
+  * 
powerpc-utils.bug-1043569_drmgr-Correct-drc-type-checking-in-check_kmods.patch
+
+-------------------------------------------------------------------

Old:
----
  powerpc-utils-1.3.3.tar.gz
  
powerpc-utils.bug-1039711_ofpathname-avoid-duplicate-entries-of-vFC-devices.patch
  powerpc-utils.bug-1040076_test-for-zlib-presence-at-configuration-time.patch
  powerpc-utils.bug-1041531_lsdevinfo-Add-support-for-vNIC-devices.patch
  powerpc-utils.bug-1041531_ofpathname-Add-support-for-vNIC-devices.patch
  powerpc-utils.bug-1042239_lsslot-Rectify-usr_drc_name-check.patch
  powerpc-utils.bug-1043569_drmgr-Correct-drc-type-checking-in-check_kmods.patch

New:
----
  powerpc-utils-1.3.4.tar.gz

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

Other differences:
------------------
++++++ powerpc-utils.spec ++++++
--- /var/tmp/diff_new_pack.VxF7EA/_old  2017-10-26 18:38:59.335056106 +0200
+++ /var/tmp/diff_new_pack.VxF7EA/_new  2017-10-26 18:38:59.339055920 +0200
@@ -16,9 +16,9 @@
 #
 
 
-%define version_unconverted 1.3.3
+%define version_unconverted 1.3.4
 Name:           powerpc-utils
-Version:        1.3.3
+Version:        1.3.4
 Release:        0
 Summary:        Utilities for PowerPC Hardware
 License:        GPL-2.0+
@@ -30,12 +30,6 @@
 Patch2:         ofpathname_powernv.patch
 Patch3:         systemd-dir.patch
 Patch4:         libvirt-service-dep.patch
-Patch5:         
powerpc-utils.bug-1039711_ofpathname-avoid-duplicate-entries-of-vFC-devices.patch
-Patch6:         
powerpc-utils.bug-1040076_test-for-zlib-presence-at-configuration-time.patch
-Patch7:         
powerpc-utils.bug-1041531_lsdevinfo-Add-support-for-vNIC-devices.patch
-Patch8:         
powerpc-utils.bug-1041531_ofpathname-Add-support-for-vNIC-devices.patch
-Patch9:         
powerpc-utils.bug-1042239_lsslot-Rectify-usr_drc_name-check.patch
-Patch10:        
powerpc-utils.bug-1043569_drmgr-Correct-drc-type-checking-in-check_kmods.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  librtas-devel
@@ -65,12 +59,6 @@
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
 
 %build
 autoreconf -fvi

++++++ libvirt-service-dep.patch ++++++
--- /var/tmp/diff_new_pack.VxF7EA/_old  2017-10-26 18:38:59.355055174 +0200
+++ /var/tmp/diff_new_pack.VxF7EA/_new  2017-10-26 18:38:59.355055174 +0200
@@ -1,7 +1,7 @@
-Index: powerpc-utils-1.3.3/systemd/smt_off.service.in
+Index: powerpc-utils-1.3.4/systemd/smt_off.service.in
 ===================================================================
---- powerpc-utils-1.3.3.orig/systemd/smt_off.service.in
-+++ powerpc-utils-1.3.3/systemd/smt_off.service.in
+--- powerpc-utils-1.3.4.orig/systemd/smt_off.service.in
++++ powerpc-utils-1.3.4/systemd/smt_off.service.in
 @@ -1,6 +1,6 @@
  [Unit]
  Description=ppc64 set SMT off

++++++ ofpathname_powernv.patch ++++++
--- /var/tmp/diff_new_pack.VxF7EA/_old  2017-10-26 18:38:59.375054241 +0200
+++ /var/tmp/diff_new_pack.VxF7EA/_new  2017-10-26 18:38:59.375054241 +0200
@@ -1,8 +1,8 @@
-Index: powerpc-utils-1.3.3/scripts/ofpathname
+Index: powerpc-utils-1.3.4/scripts/ofpathname
 ===================================================================
---- powerpc-utils-1.3.3.orig/scripts/ofpathname
-+++ powerpc-utils-1.3.3/scripts/ofpathname
-@@ -1630,7 +1630,7 @@ of2l_nvme()
+--- powerpc-utils-1.3.4.orig/scripts/ofpathname
++++ powerpc-utils-1.3.4/scripts/ofpathname
+@@ -1632,7 +1632,7 @@ of2l_nvme()
  . $PSERIES_PLATFORM
  if [[ $platform = $PLATFORM_POWERNV ]]; then
        echo "$OFPATHNAME: is not supported on the $platform_name platform"

++++++ powerpc-utils-1.3.3.tar.gz -> powerpc-utils-1.3.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/Changelog 
new/powerpc-utils-1.3.4/Changelog
--- old/powerpc-utils-1.3.3/Changelog   2016-12-12 16:41:49.000000000 +0100
+++ new/powerpc-utils-1.3.4/Changelog   2017-09-01 23:48:19.000000000 +0200
@@ -1,3 +1,338 @@
+powerpc-utils-1.3.4
+=====================================================================
+
+commit c8083fbc1bfe1548057478ae46543bf58bffc7d4
+Author: Michael Bringmann <[email protected]>
+Date:   Wed Aug 23 09:06:45 2017 -0500
+
+    powerpc-utils.spec: Add "Vendor: IBM Corp."
+    
+    Ensure that "Vendor: IBM Corp." appears in archive for all checkouts
+    and derived builds.
+    
+    Signed-off-by: Michael Bringmann <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 50f11c6c6618e7d59232d67e7446d07714af453b
+Author: Nathan Fontenot <[email protected]>
+Date:   Thu Jul 6 12:31:36 2017 -0400
+
+    lsslot: Validate DRC property groups
+    
+    Recently seen on a kvm guest running on a PowerNV system, the
+    lsslot command segfaulted when trying to free the drc information.
+    
+    # gdb -q ./lsslot
+    Reading symbols from ./lsslot...done.
+    (gdb) run -c memory
+    Starting program: ./lsslot -c memory
+    
+    Program received signal SIGSEGV, Segmentation fault.
+    free_drc_info () at src/drmgr/common_ofdt.c:287
+    287                        all_drc_lists = list->all_next;
+    
+    The root cause of this is that the DRC properties in the guest were empty.
+    This caused the lsslot (and likely possible in drmgr since this code
+    is common to both commands) to improperly parse the device tree
+    information.
+    
+    To fix this we need to add a check after gathering information for
+    each of the DRC properties when reading DRC property group data. If
+    there are no entries in any of the DRC properties we cannot continue.
+    
+    Reported-by: Seeteena Thoufeek <[email protected]>
+    Signed-off-by: Nathan Fontenot <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit c25ae395db914f1137bb8a718277ea4b6f69136b
+Author: Samuel Mendoza-Jonas <[email protected]>
+Date:   Mon Jul 10 11:23:27 2017 +1000
+
+    ppc64_cpu: Treat CPUs as online if cpu hotplug not enabled
+    
+    cpu_online() looks for the "online" attribute to decide if a cpu is
+    online, however if the kernel does not have CONFIG_HOTPLUG_CPU enabled
+    the attribute will not exist.
+    get_attribute() calls access() first to check if the attribute exists,
+    which will set errno with ENOENT if it is missing. If get_attribute()
+    fails with this specific error, treat the cpu as online.
+    
+    Signed-off-by: Samuel Mendoza-Jonas <[email protected]>
+    [tyreld: removed unnecessary braces from if block]
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 817900edd96c66d6f43f75aaefbe38bba6bab035
+Author: Tyrel Datwyler <[email protected]>
+Date:   Fri Aug 4 16:24:01 2017 -0700
+
+    Revert "ppc64_cpu: Treat CPUs as online if cpu hotplug not enabled"
+    
+    This reverts commit 5f70f6c1af2dd61122acfdbaa6e38be062bb220a.
+    
+    Reverting the commit as further inspection came to show it actually
+    marked a cpu as offline when hotplug was not enabled.
+    
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 136fab970076018bd56aa1aa0c09b8954b89b0b5
+Author: Nathan Fontenot <[email protected]>
+Date:   Tue Jun 6 12:12:36 2017 -0400
+
+    drmgr: Correct some bad formatting in drmig_chrp_pmig.c
+    
+    No functional changes, justy making the code more readable.
+    
+    Signed-off-by: Nathan Fontenot <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 1c5319c76ae8b378bfd59e8c0a08e89f83867dbf
+Author: Nathan Fontenot <[email protected]>
+Date:   Wed Jun 7 16:35:33 2017 -0400
+
+    drmgr: Correct errno usage in init_cpu_info()
+    
+    The error message reported if allocaing a dr node fails
+    should not report the errno value. The call to allocate the
+    dr node makes multiple syscalls and there is no way to
+    determine which one last updated errno.
+    
+    Signed-off-by: Nathan Fontenot <[email protected]>
+    Reviewed-by: Paul Clarke <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 998933a5185f9c56d1d6bce77301f3e7be6a54cf
+Author: Nathan Fontenot <[email protected]>
+Date:   Wed Jun 7 16:35:28 2017 -0400
+
+    drmgr: Correct errno usage use in validate_paltform()
+    
+    For validate_platform(), the call to get_property makes many
+    system calls and there is no way to know what last updated the
+    errno value. This patch drops the output of strerror() due to
+    this reason.
+    
+    Signed-off-by: Nathan Fontenot <[email protected]>
+    Reviewed-by: Paul Clarke <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit d1c6662d38adeb98a1fd8906cd54031c6fdd653d
+Author: Nathan Fontenot <[email protected]>
+Date:   Wed Jun 7 16:35:22 2017 -0400
+
+    drmgr: Stale errno usage corrections
+    
+    Several places in the drmgr code use a stale value of errno either
+    as a return code or when printing an error message. A common example
+    of this is calling the say() routine and then returning the value of
+    errno. The say() routine makes several system calls and the value of
+    errno after a call to say() no longer reflects the original errno
+    value.
+    
+    Several places in the drmgr code were updated to properly handle
+    the return codes from functions such as write() or open() where we
+    should be checking for rc == -1 instead of rc <= 0. This does make
+    a difference as errno won't be set for rc == 0.
+    
+    Note that partial write return codes are not really handled in the
+    drmgr code. The drmgr command is writing to sysfs and /proc
+    files where we know that they will either return success or
+    failure and set errno, no partial writes.
+    
+    Signed-off-by: Nathan Fontenot <[email protected]>
+    Reviewed-by: Paul Clarke <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 479f1a1122f7d9025d3a21e60a0431d2eba6ee2f
+Author: Nathan Fontenot <[email protected]>
+Date:   Tue Jun 6 12:12:22 2017 -0400
+
+    drmgr: Correct drc type checking in check_kmods()
+    
+    Fixes: f9986ac43011 ("drmgr: Move options.ctype to global usr_drc_type")
+    
+    When the conversion to using the global usr_drc_type was
+    made the logic checking for whic drc types we need to check
+    the rpadlpar_io kernbel module for was broken. This corrects
+    the check.
+    
+    Signed-off-by: Nathan Fontenot <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 27e8d5b8218bc8c8c772080b0d99691bd31d4f0f
+Author: Chandni Verma <[email protected]>
+Date:   Thu Jun 1 19:07:13 2017 +0530
+
+    lsslot: Rectify usr_drc_name check
+    
+    This incorrect check refrains lsslot from displaying the slot information.
+    
+    Fixes: e82fb588f573 (lsslot: replace struct options member s_name with 
usr_drc_name)
+    Signed-off-by: Chandni Verma <[email protected]>
+    Signed-off-by: Nathan Fontenot <[email protected]>
+    [tyreld: added fixes tag]
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 74715cc0e4db0e2738be7a19c852816c285d8284
+Author: Nathan Fontenot <[email protected]>
+Date:   Mon May 22 16:40:58 2017 -0400
+
+    lsdevinfo: Add support for vNIC devices
+    
+    Add support to dump information about vNIC devices so that device info
+    requests from the HMC can retrieve data about vNIC devices.
+    
+    Signed-off-by: Nathan Fontenot <[email protected]>
+    [tyreld: fixed up trailing whitespace]
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 25615a80f3fb5ebcc26d7b00316afce8c46ab2f9
+Author: Nathan Fontenot <[email protected]>
+Date:   Mon May 22 16:40:50 2017 -0400
+
+    ofpathname: Add support for vNIC devices
+    
+    Add 'vnic' to the list of device types for of2l_ethernet so vNIC
+    devices are supported.
+    
+    Signed-off-by: Nathan Fontenot <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 6464f8e96228f7db355f08f270ada1104c3562c3
+Author: Amartey Pearson <[email protected]>
+Date:   Tue May 16 14:01:30 2017 -0500
+
+    Improve perf of drmgr/lsslot with large num of virt. dev.
+    
+    The current algorithm for add_pci_vio_node walks the vdevice bus
+    for every theoretical DRC (1000's of times).  The more vdevices
+    you have populated, the worse this algorithm becomes.  On a system
+    with 450 devices, this can take over 30 seconds for example.
+    
+    This modifies the algorithm to populate a node list of existing
+    devices (so walks the tree just once), and then uses these nodes
+    when populating the full list instead of walking the device tree
+    for each one.
+    
+    NOTE:  This only is changed for virtual devices - a system with
+    large numbers of PCI devices will not be optimized, but that is
+    less of a concern.
+    
+    Signed-off-by: Amartey Pearson <[email protected]>
+    Signed-off-by: Bryant G. Ly <[email protected]>
+    [tyreld: changed my_drc_index type from u32 to uint32_t]
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 7539330a301ff9ac7d6fd5e1cf974bb9999100b2
+Author: Tyrel Datwyler <[email protected]>
+Date:   Fri May 19 16:02:51 2017 -0400
+
+    Test for zlib presence at configuration time
+    
+    The nvram utility links with zlib and compilation will fail if zlib.h or
+    libz.so are not present. Check and warn at configuration time.
+    
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 3a7b15104fb956aa2e5debababe8536dbd4e8cef
+Author: Russell Currey <[email protected]>
+Date:   Fri May 19 17:36:45 2017 -0400
+
+    errinjct: Remove platform check to enable KVM guests
+    
+    qemu/KVM guests can have RTAS as well.  There's already a check to see if
+    RTAS is present, there's no need to hardcode the supported platform.
+    Removing this check allows errinjct to work on KVM guests.
+    
+    Signed-off-by: Russell Currey <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 5f70f6c1af2dd61122acfdbaa6e38be062bb220a
+Author: Samuel Mendoza-Jonas <[email protected]>
+Date:   Fri Apr 21 16:47:57 2017 +1000
+
+    ppc64_cpu: Treat CPUs as online if cpu hotplug not enabled
+    
+    cpu_online() looks for the "online" attribute to decide if a cpu is
+    online, however if the kernel does not have CONFIG_HOTPLUG_CPU enabled
+    the attribute will not exist.
+    If hotplug is not enabled then the cpu can be assumed to be online - in
+    this case, update cpu_online() to treat the cpu as online.
+    
+    Signed-off-by: Samuel Mendoza-Jonas <[email protected]>
+    Acked-by: Stewart Smith <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 4fcc611a09caea70e6bca6a1275211c72ac4bb45
+Author: Seeteena Thoufeek <[email protected]>
+Date:   Wed Jan 11 15:36:33 2017 +0530
+
+    warning: command substitution: ignored null byte in input device
+    
+    Ubuntu 17.04: "command substitution: ignored null byte in input" warning 
message is displayed while running few RAS commands.
+    
+    The command execution of ls-veth, ls-vscsi, lsdevinfo, and ofpathname 
returns following output.
+    
+    lsdevinfo
+    /usr/sbin/lsdevinfo: line 233: warning: command substitution: ignored null 
byte in input
+    device: name="ibmveth2"
+    ls-vscsi
+    /usr/sbin/ls-vscsi: line 72: warning: command substitution: ignored null 
byte in input
+    host0 U8286.42A.1069B3T-V8-C17-T1
+    ls-veth
+    /usr/sbin/ls-veth: line 74: warning: command substitution: ignored null 
byte in input
+    ibmveth2 U8286.42A.1069B3T-V8-C2-T1
+    ofpathname sda
+    /usr/sbin/ofpathname: line 812: warning: command substitution: ignored 
null byte in input
+    /usr/sbin/ofpathname: line 865: cd: too many arguments
+    /vdevice/v-scsi@30000011/disk@8100000000000000
+    
+    Newer versions of bash (Bash 4.4)  warn about null bytes in command 
substitutions. This is fixed.
+    
+    Also fixed /usr/sbin/ofpathname: line 865: cd: too many arguments.
+    
+    Signed-off-by: Seeteena Thoufeek <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 25b8f7d67fb3acee0970cd36f24dc17fac1f6dc3
+Author: Pawan K Singh5 <[email protected]>
+Date:   Mon Apr 10 15:00:28 2017 +0530
+
+    ofpathname : avoid duplicate entries of vFC devices
+    
+    Adding support to avoid the duplicate entries of a Open Firmware device 
path to
+    logical device path for vfc-client devices.
+    
+    The problem can be reproduced with the bootlist command
+    
+    # bootlist -m normal /dev/sdd /dev/sds /dev/sdf /dev/sdv
+    # bootlist -m normal -r
+    /vdevice/vfc-client@30000899/disk@500507680b2255fe
+    /vdevice/vfc-client@30000899/disk@500507680b2255ff
+    /vdevice/vfc-client@3000089a/disk@500507680b2255fe
+    /vdevice/vfc-client@3000089a/disk@500507680b2255ff
+    # bootlist -m normal -o
+    sda---------------->expected "sdd"
+    sdp---------------->expected "sds"
+    sda---------------->expected "sdf"
+    sdp---------------->expected "sdv"
+    
+    So, this patch check the duplicate entries of logical names of vFC devices 
at of2l_vfc()
+    and display specified bootlist :
+    
+    # bootlist -m normal -r
+    /vdevice/vfc-client@30000899/disk@500507680b2255fe
+    /vdevice/vfc-client@30000899/disk@500507680b2255ff
+    /vdevice/vfc-client@3000089a/disk@500507680b2255fe
+    /vdevice/vfc-client@3000089a/disk@500507680b2255ff
+    # bootlist -m normal -o
+    sdd
+    sds
+    sdf
+    sdv
+    
+    Signed-off-by: Pawan K Singh5 <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
 powerpc-utils-1.3.3
 =====================================================================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/configure.ac 
new/powerpc-utils-1.3.4/configure.ac
--- old/powerpc-utils-1.3.3/configure.ac        2016-12-12 16:41:49.000000000 
+0100
+++ new/powerpc-utils-1.3.4/configure.ac        2017-09-01 23:48:19.000000000 
+0200
@@ -1,6 +1,6 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
-m4_define([ppu_version], 1.3.3)
+m4_define([ppu_version], 1.3.4)
 
 AC_PREREQ([2.63])
 AC_INIT([powerpc-utils], ppu_version, [[email protected]])
@@ -37,6 +37,11 @@
 AC_FUNC_MKTIME
 AC_CHECK_FUNCS([memset strchr strcspn strdup strerror strrchr strstr strtol 
strtoul strtoull gettimeofday])
 
+# check for zlib
+AC_CHECK_HEADER(zlib.h,
+               [AC_CHECK_LIB(z, inflate, [], [AC_MSG_FAILURE([zlib library is 
required for compilation])])],
+               [AC_MSG_FAILURE([zlib.h is required for compiliation])])
+
 # check for librtas
 AC_ARG_WITH([librtas],
     [AS_HELP_STRING([--without-librtas],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/powerpc-utils.spec.in 
new/powerpc-utils-1.3.4/powerpc-utils.spec.in
--- old/powerpc-utils-1.3.3/powerpc-utils.spec.in       2016-12-12 
16:41:49.000000000 +0100
+++ new/powerpc-utils-1.3.4/powerpc-utils.spec.in       2017-09-01 
23:48:19.000000000 +0200
@@ -9,6 +9,7 @@
 Group:         System Environment
 Source:                powerpc-utils-%{version}.tar.gz
 BuildRoot:     /tmp/%{name}-buildroot/
+Vendor:         IBM Corp.
 Requires:      /bin/bash, /bin/sh, /bin/sed, /usr/bin/perl, librtas >= 1.4.0, 
zlib
 Requires:      bc
 Requires:      coreutils
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/scripts/ls-veth 
new/powerpc-utils-1.3.4/scripts/ls-veth
--- old/powerpc-utils-1.3.3/scripts/ls-veth     2016-12-12 16:41:49.000000000 
+0100
+++ new/powerpc-utils-1.3.4/scripts/ls-veth     2017-09-01 23:48:19.000000000 
+0200
@@ -71,7 +71,7 @@
     name=$($OFPATHNAME -l $(echo $dev | $SED -e "s/\/proc\/device-tree//"))
 
     # get the physical location
-    physloc=$($CAT $dev/ibm,loc-code)
+    physloc=$(tr -d '\0' < $dev/ibm,loc-code)
 
     echo "$name $physloc"
 done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/scripts/ls-vscsi 
new/powerpc-utils-1.3.4/scripts/ls-vscsi
--- old/powerpc-utils-1.3.3/scripts/ls-vscsi    2016-12-12 16:41:49.000000000 
+0100
+++ new/powerpc-utils-1.3.4/scripts/ls-vscsi    2017-09-01 23:48:19.000000000 
+0200
@@ -69,7 +69,7 @@
 # Look at every ibmvscsi (Virtual SCSI) device
 for dev in $($LS -d /proc/device-tree/vdevice/v-scsi* 2> /dev/null) ; do
     # pull the physical location
-    physloc=$($CAT $dev/ibm,loc-code)
+    physloc=$(tr -d '\0' < $dev/ibm,loc-code)
 
     # find the slot so it can be used in sysfs
     slot=$(echo $dev | $SED -e "s/\/proc\/device-tree\/vdevice\/v-scsi@//")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/scripts/lsdevinfo 
new/powerpc-utils-1.3.4/scripts/lsdevinfo
--- old/powerpc-utils-1.3.3/scripts/lsdevinfo   2016-12-12 16:41:49.000000000 
+0100
+++ new/powerpc-utils-1.3.4/scripts/lsdevinfo   2017-09-01 23:48:19.000000000 
+0200
@@ -222,6 +222,27 @@
     fi
 }
 
+# Look at every vNIC device
+for dev in $($LS -d /proc/device-tree/vdevice/vnic* 2> /dev/null); do
+    # use ofpathname to get the device name (i.e. eth0)
+    name=$($OFPATHNAME -l $(echo $dev | $SED -e "s/\/proc\/device-tree//"))
+    connection=$(echo $dev | $SED -e 
"s/\/proc\/device-tree\/vdevice\/l-lan@//")
+    parent="vio"
+
+    # get the physical location
+    physloc=$(tr -d '\0' < $dev/ibm,loc-code)
+    uniquetype="adapter/vdevice/IBM,vnic"
+    class="adapter"
+    subclass="vdevice"
+    type="IBM,vnic"
+    prefix="eth"
+    driver="ibmvnic"
+    status=1
+
+    show=1
+    show_eth
+done
+
 # Look at every ibmveth (Virtual Ethernet) device 
 for dev in $($LS -d /proc/device-tree/vdevice/l-lan* 2> /dev/null); do 
     # use ofpathname to get the device name (i.e. eth0)
@@ -230,7 +251,7 @@
     parent="vio"
 
     # get the physical location 
-    physloc=$($CAT $dev/ibm,loc-code)
+    physloc=$(tr -d '\0' < $dev/ibm,loc-code)
     uniquetype="adapter/vdevice/IBM,l-lan"
     class="adapter"
     subclass="vdevice"
@@ -272,7 +293,7 @@
 # Look at every ibmvscsi (Virtual SCSI) device
 for dev in $($LS -d /proc/device-tree/vdevice/v-scsi* 2> /dev/null) ; do
     # pull the physical location
-    physloc=$(cat $dev/ibm,loc-code)
+    physloc=$(tr -d '\0' < $dev/ibm,loc-code)
     hostphysloc=$physloc
     connection=$(echo $dev | $SED -e 
"s/\/proc\/device-tree\/vdevice\/v-scsi@//")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/scripts/ofpathname 
new/powerpc-utils-1.3.4/scripts/ofpathname
--- old/powerpc-utils-1.3.3/scripts/ofpathname  2016-12-12 16:41:49.000000000 
+0100
+++ new/powerpc-utils-1.3.4/scripts/ofpathname  2017-09-01 23:48:19.000000000 
+0200
@@ -813,7 +813,7 @@
     fc=${fc##/*/}
 
     if [[ -e /proc/device-tree$OF_PATH/device_type ]]; then
-        devtype=`$CAT /proc/device-tree$OF_PATH/device_type`;
+        devtype=`tr -d '\0' < /proc/device-tree$OF_PATH/device_type`;
         if [[ $devtype = "fcp" || $devtype = "scsi-fcp" ]]; then
                 fc="fibre-channel";
         fi
@@ -865,8 +865,7 @@
                 OF_PATH=$(printf "%s/disk@%s,%s" $OF_PATH $wwpn $vfc_lun)
         else
                 local i vdiskno
-                cd host*
-                cd target*
+               goto_dir $device_path $device_dir
                 vdiskno=`get_vdisk_no $device_dir`
 
                 OF_PATH=$OF_PATH/disk\@$vdiskno
@@ -1031,6 +1030,7 @@
                              of2l_ide
                           fi ;;
         eth* | l-lan  )  of2l_ethernet ;;
+       vnic          )  of2l_ethernet ;;
         hfi-ethernet* )  of2l_hfi ;;
         disk*         )  of2l_ide ;;
         usb           )  of2l_usb ;;
@@ -1494,8 +1494,10 @@
        local wwpn=`get_fc_wwpn "$link/../../fc_remote_ports*"`
 
         if [[ $vfc_lun = $OF_LUN && $wwpn = $OF_WWPN ]]; then
+            if [[ $OF_PATH = $DEVPATH ]]; then
             LOGICAL_DEVNAME="${dir##*/}"
             return
+            fi
         fi
     done
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/src/drmgr/common.c 
new/powerpc-utils-1.3.4/src/drmgr/common.c
--- old/powerpc-utils-1.3.3/src/drmgr/common.c  2016-12-12 16:41:49.000000000 
+0100
+++ new/powerpc-utils-1.3.4/src/drmgr/common.c  2017-09-01 23:48:19.000000000 
+0200
@@ -113,8 +113,8 @@
        int rc;
 
        /* We only need to do this for PHB/SLOT/PCI operations */
-       if (usr_drc_type == DRC_TYPE_PCI || usr_drc_type == DRC_TYPE_PHB ||
-           usr_drc_type == DRC_TYPE_SLOT)
+       if (usr_drc_type != DRC_TYPE_PCI && usr_drc_type != DRC_TYPE_PHB &&
+           usr_drc_type != DRC_TYPE_SLOT)
                return 0;
 
        /* We don't use rpadlar_io/rpaphp for PCI operations run with the
@@ -308,7 +308,6 @@
        struct flock    dr_lock_info;
        int             rc;
        mode_t          old_mode;
-       int             first_try = 1;
 
        old_mode = umask(0);
        dr_lock_fd = open(DR_LOCK_FILE, O_RDWR | O_CREAT,
@@ -323,21 +322,18 @@
        dr_lock_info.l_len = 0;
 
        do {
-               if (!first_try) {
-                       sleep(1);
-                       first_try = 0;
-               }
-
                rc = fcntl(dr_lock_fd, F_SETLK, &dr_lock_info);
-               if (rc != -1)
+               if (rc == 0)
                        return 0;
 
-               if (drmgr_timed_out())
+               /* lock may be held by another process */
+               if (errno != EACCES && errno != EAGAIN)
                        break;
 
-               if (rc == -1 && errno == EACCES)
-                       continue;
+               if (drmgr_timed_out())
+                       break;
 
+               sleep(1);
        } while (1);
 
        close(dr_lock_fd);
@@ -467,11 +463,11 @@
        say(DEBUG, "ofdt update: %s\n", buf);
 
        fd = open(OFDTPATH, O_WRONLY);
-       if (fd <= 0) {
+       if (fd == -1) {
                say(ERROR, "Failed to open %s: %s\n", OFDTPATH,
                    strerror(errno));
                free(buf);
-               return errno;
+               return -1;
        }
 
        rc = write(fd, buf, bufsize);
@@ -516,10 +512,10 @@
        cmdlen = strlen(buf);
 
        fd = open(OFDTPATH, O_WRONLY);
-       if (fd <= 0) {
+       if (fd == -1) {
                say(ERROR, "Failed to open %s: %s\n", OFDTPATH,
                    strerror(errno));
-               return errno;
+               return -1;
        }
 
        rc = write(fd, buf, cmdlen);
@@ -667,10 +663,10 @@
        say(DEBUG, "Updating OF property\n");
 
        fd = open(OFDTPATH, O_WRONLY);
-       if (fd <= 0) {
+       if (fd == -1) {
                say(ERROR, "Failed to open %s: %s\n", OFDTPATH,
                    strerror(errno));
-               return errno;
+               return -1;
        }
 
        rc = write(fd, buf, len);
@@ -1028,8 +1024,7 @@
 
        rc = get_property(OFDT_BASE, "device_type", buf, 128);
        if (rc) {
-               say(ERROR, "Cannot open %s: %s\n", PLATFORMPATH,
-                   strerror(errno));
+               say(ERROR, "Cannot validate platform %s\n", platform);
                return 0;
        }
 
@@ -1458,6 +1453,7 @@
 int do_kernel_dlpar(const char *cmd, int cmdlen)
 {
        int fd, rc;
+       int my_errno;
 
        say(DEBUG, "Initiating kernel DLPAR \"%s\"\n", cmd);
 
@@ -1470,10 +1466,13 @@
        }
 
        rc = write(fd, cmd, cmdlen);
+       my_errno = errno;
        close(fd);
        if (rc <= 0) {
-               say(ERROR, "Failed: %s\n", strerror(errno));
-               return rc;
+               /* write does not set errno for rc == 0 */
+               say(ERROR, "Failed to write to %s: %s\n", SYSFS_DLPAR_FILE,
+                   (rc == 0) ? "wrote 0 bytes" : strerror(my_errno));
+               return -1;
        }
 
        say(INFO, "Success\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/src/drmgr/common_cpu.c 
new/powerpc-utils-1.3.4/src/drmgr/common_cpu.c
--- old/powerpc-utils-1.3.3/src/drmgr/common_cpu.c      2016-12-12 
16:41:49.000000000 +0100
+++ new/powerpc-utils-1.3.4/src/drmgr/common_cpu.c      2017-09-01 
23:48:19.000000000 +0200
@@ -304,8 +304,7 @@
        for (drc = drc_list; drc; drc = drc->next) {
                cpu = alloc_dr_node(drc, CPU_DEV, NULL);
                if (cpu == NULL) {
-                       say(ERROR, "Could not allocate CPU node structure: "
-                           "%s\n", strerror(errno));
+                       say(ERROR, "Could not allocate CPU node structure\n");
                        free_node(cpu_list);
                        return -1;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/src/drmgr/common_ofdt.c 
new/powerpc-utils-1.3.4/src/drmgr/common_ofdt.c
--- old/powerpc-utils-1.3.3/src/drmgr/common_ofdt.c     2016-12-12 
16:41:49.000000000 +0100
+++ new/powerpc-utils-1.3.4/src/drmgr/common_ofdt.c     2017-09-01 
23:48:19.000000000 +0200
@@ -70,8 +70,13 @@
        }
 
        prop->n_entries = be32toh(*(uint *)prop->_data);
-       prop->val = prop->_data + sizeof(uint);
+       if (prop->n_entries == 0) {
+               say(ERROR, "No entries found in %s/%s\n",
+                   full_path, prop_name);
+               return -1;
+       }
 
+       prop->val = prop->_data + sizeof(uint);
        return 0;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/src/drmgr/common_pci.c 
new/powerpc-utils-1.3.4/src/drmgr/common_pci.c
--- old/powerpc-utils-1.3.3/src/drmgr/common_pci.c      2016-12-12 
16:41:49.000000000 +0100
+++ new/powerpc-utils-1.3.4/src/drmgr/common_pci.c      2017-09-01 
23:48:19.000000000 +0200
@@ -381,6 +381,83 @@
        return rc;
 }
 
+/**
+ * create_vio_nodes
+ * Creates a set of dr_nodes for any existing vio nodes in the supplied path.
+ * This walks the device tree once.
+ *
+ * @param ofdt_path
+ * @param drc_list
+ * @param node_list - user responsible for freeing
+ * @returns 0 on success, !0 otherwise
+ */
+static int
+create_vio_nodes(const char *ofdt_path,
+                struct dr_connector *drc_list,
+                struct dr_node **node_list)
+{
+       DIR *d;
+       struct dirent *de;
+       char child_path[DR_PATH_MAX];
+       uint32_t my_drc_index;
+       struct dr_node *node;
+       struct dr_connector *drc;
+       struct dr_connector *drc_search;
+       int rc;
+
+       d = opendir(ofdt_path);
+       if (!d)
+               return -1;
+
+       rc = 0;
+       while ((de = readdir(d)) != NULL) {
+               if ((de->d_type != DT_DIR) || is_dot_dir(de->d_name))
+                       continue;
+
+               snprintf(child_path, DR_PATH_MAX, "%s/%s", ofdt_path,
+                        de->d_name);
+               if (get_my_drc_index(child_path, &my_drc_index))
+                       continue;
+               drc = NULL;
+               for (drc_search = drc_list; drc_search; drc_search = 
drc_search->next) {
+                       if (drc_search->index == my_drc_index) {
+                               drc = drc_search;
+                               break;
+                       }
+               }
+               if (!drc) {
+                       say(ERROR, "Unable to find DRC index %d\n",
+                           my_drc_index);
+                       rc = -1;
+                       break;
+               }
+
+               node = alloc_dr_node(drc, VIO_DEV, child_path);
+               if (!node) {
+                       say(ERROR, "Could not allocate pci/vio node\n");
+                       rc = -1;
+                       break;
+               }
+
+               node->is_owned = 1;
+
+               /* Populate w/ children */
+               rc = init_node(node);
+               if (rc) {
+                       free(node);
+                       break;
+               }
+
+               node->next = *node_list;
+               *node_list = node;
+       }
+
+       closedir(d);
+       if (rc)
+               free_node(*node_list);
+       return rc;
+}
+
 static inline int is_hp_type(char *type)
 {
        return (strtoul(type, NULL, 10) > 0);
@@ -606,6 +683,9 @@
        struct dr_connector *drc_list;
        struct dr_connector *drc;
        struct dr_node *node;
+       struct dr_node *vio_node_list = NULL;
+       struct dr_node *node_search;
+       struct dr_node *node_search_prev;
        int child_dev_type = 0;
        int rc = -1;
 
@@ -613,7 +693,16 @@
        if (drc_list == NULL)
                return -1;
 
+       // Create a list of existing VIO nodes so we can
+       // walk the vio bus only once
+       if (dev_type == VIO_DEV) {
+               rc = create_vio_nodes(path, drc_list, &vio_node_list);
+               if (rc)
+                       return rc;
+       }
+
        for (drc = drc_list; drc != NULL; drc = drc->next) {
+               node = NULL;
                switch (dev_type) {
                        case PCI_HP_DEV:
                                if (! is_hp_type(drc->type))
@@ -635,25 +724,53 @@
                                break;
                }
 
-               node = alloc_dr_node(drc, child_dev_type, path);
-               if (node == NULL) {
-                       say(ERROR, "Could not allocate pci/vio node\n");
-                       return -1;
+               // If this is VIO, look for the node in our existing list
+               if (dev_type == VIO_DEV) {
+                       node_search = vio_node_list;
+                       node_search_prev = NULL;
+                       while (node_search) {
+                               if (drc->index == node_search->drc_index) {
+                                       /*
+                                        * Use this node - and remove it
+                                        * from the list
+                                        */
+                                       node = node_search;
+                                       if (node_search_prev)
+                                               node_search_prev->next =
+                                                       node->next;
+                                       else
+                                               vio_node_list = node->next;
+                                       break;
+                               }
+                               node_search_prev = node_search;
+                               node_search = node_search->next;
+                       }
                }
 
-               if (child_dev_type == PCI_HP_DEV)
-                       node->is_owned = 1;
+               if (!node) {
+                       node = alloc_dr_node(drc, child_dev_type, path);
+                       if (!node) {
+                               say(ERROR, "Could not allocate pci/vio node\n");
+                               free_node(vio_node_list);
+                               return -1;
+                       }
 
-               rc = init_node(node);
-               if (rc) {
-                       free(node);
-                       return rc;
+                       if (child_dev_type == PCI_HP_DEV)
+                               node->is_owned = 1;
+
+                       if (dev_type != VIO_DEV) {
+                               rc = init_node(node);
+                               if (rc) {
+                                       free(node);
+                                       return rc;
+                               }
+                       }
                }
 
                node->next = *node_list;
                *node_list = node;
        }
-
+       free_node(vio_node_list);
        return rc;
 }
 
@@ -1223,6 +1340,7 @@
 {
        int rc = 0, len;
        FILE *file;
+       int my_errno;
 
        len = strlen(drc_name);
        say(DEBUG, "performing kernel op for %s, file is %s\n", drc_name,
@@ -1235,25 +1353,37 @@
                if (file == NULL) {
                        say(ERROR, "failed to open %s: %s\n", interface_file,
                            strerror(errno));
-                       return -ENODEV;
+                       return -1;
                }
 
                rc = fwrite(drc_name, 1, len, file);
+               my_errno = errno;
                fclose(file);
 
-               sleep(1);
-               if (drmgr_timed_out())
-                       return -1;
-       } while (errno == EBUSY);
+               /* Success, note we do fwrite with the values
+                * size = 1 and nitems = len.
+                */
+               if (rc == len)
+                       return 0;
 
-       if (errno || (rc != len)) {
-               say(ERROR, "kernel I/O op failed, rc = %d len = %d.\n%s\n",
-                   rc, len, strerror(errno));
+               /* We should continue trying the kernel op if we get EBUSY,
+                * this would indicate the add/remove operation has not
+                * completed.
+                */
+               if (my_errno != EBUSY) {
+                       say(ERROR, "kernel I/O op failed, %s\n",
+                           my_errno ? strerror(my_errno)
+                                    : "incomplete write");
+                       break;
+               }
 
-               return errno ? errno : rc;
-       }
+               sleep(1);
 
-       return 0;
+               if (drmgr_timed_out())
+                       break;
+       } while (1);
+
+       return -1;
 }
 
 int dlpar_remove_slot(const char *drc_name)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/src/drmgr/drmig_chrp_pmig.c 
new/powerpc-utils-1.3.4/src/drmgr/drmig_chrp_pmig.c
--- old/powerpc-utils-1.3.3/src/drmgr/drmig_chrp_pmig.c 2016-12-12 
16:41:49.000000000 +0100
+++ new/powerpc-utils-1.3.4/src/drmgr/drmig_chrp_pmig.c 2017-09-01 
23:48:19.000000000 +0200
@@ -47,7 +47,10 @@
 
 /* drmgr must call ibm,suspend-me and is responsible for postmobility fixups */
 #define MIGRATION_API_V0       0
-/* drmgr must write to sysfs migration store and allow kernel to do 
postmobility fixups */
+
+/* drmgr must write to sysfs migration store and allow kernel to do
+ * postmobility fixups
+ */
 #define MIGRATION_API_V1       1
 
 static struct pmap_struct *plist;
@@ -198,11 +201,10 @@
        int i, fd;
 
        fd = open(OFDTPATH, O_WRONLY);
-       if (fd <= 0) {
+       if (fd == -1) {
                say(ERROR, "Failed to open %s: %s\n", OFDTPATH,
                    strerror(errno));
-               rc = errno;
-               return rc;
+               return -1;
        }
 
        say(DEBUG, "len %d\n", len);
@@ -303,7 +305,8 @@
                        say(DEBUG, "Null byte = %2.2x, ", *((char *)op));
                        op = (unsigned int *)(((char *)op) + 1);
                        vd = *op++;
-                       say(DEBUG, "string length = %u, path = %s\n", vd, 
((char *)op));
+                       say(DEBUG, "string length = %u, path = %s\n", vd,
+                           ((char *)op));
                        op = (unsigned int *)(((char *)op) + vd);
                        initial = 0;
 
@@ -582,12 +585,16 @@
        int api_level = 0;
        char buf[64];
 
-       /* If the kernel can also do the device tree update we should let the 
kernel do all the work.
-          Check if sysfs migration api_version is readable and use api level 
to determine how to
-          perform migration and post-mobility updates. */
-       rc = get_int_attribute(SYSFS_MIGRATION_API_FILE, NULL, &api_level, 
sizeof(&api_level));
+       /* If the kernel can also do the device tree update we should let
+        * the kernel do all the work. Check if sysfs migration api_version
+        * is readable and use api level to determine how to perform
+        * migration and post-mobility updates.
+        */
+       rc = get_int_attribute(SYSFS_MIGRATION_API_FILE, NULL, &api_level,
+                              sizeof(&api_level));
        if (rc)
-               say(DEBUG,"get_int_attribute returned %d for path %s\n", rc, 
SYSFS_MIGRATION_API_FILE);
+               say(DEBUG, "get_int_attribute returned %d for path %s\n",
+                   rc, SYSFS_MIGRATION_API_FILE);
 
        if (api_level == MIGRATION_API_V0) {
                say(DEBUG, "about to issue ibm,suspend-me(%llx)\n", stream_val);
@@ -608,15 +615,19 @@
 
                rc = write(fd, buf, strlen(buf));
                if (rc < 0) {
-                       say(DEBUG, "Write to migration file failed with rc: 
%d\n", rc);
-                       rc = errno;
+                       int my_errno = errno;
+                       say(DEBUG,
+                           "Write to migration file failed with rc: %d\n",
+                           rc);
+                       rc = my_errno;
                } else if (rc > 0)
                        rc = 0;
 
                close(fd);
                say(DEBUG, "Kernel migration returned %d\n", rc);
        } else {
-               say(ERROR, "Unknown kernel migration api version %d\n", 
api_level);
+               say(ERROR, "Unknown kernel migration api version %d\n",
+                   api_level);
                rc = -1;
        }
 
@@ -642,9 +653,10 @@
 
        rc = write(fd, buf, strlen(buf));
        if (rc < 0) {
+               int my_errno = errno;
                say(DEBUG, "Write to hibernation file failed with rc: %d\n",
                    rc);
-               rc = errno;
+               rc = my_errno;
        } else if (rc > 0)
                rc = 0;
        close(fd);
@@ -668,12 +680,14 @@
           needs to perform a device tree update */
        rc = get_int_attribute(path, NULL, &do_update, sizeof(do_update));
        if (rc)
-               say(DEBUG, "get_int_attribute returned %d for path %s\n", rc, 
path);
+               say(DEBUG, "get_int_attribute returned %d for path %s\n",
+                   rc, path);
 
        if (!do_update) {
                rc = rtas_activate_firmware();
                if (rc)
-                       say(DEBUG, "rtas_activate_firmware() returned %d\n", 
rc);
+                       say(DEBUG, "rtas_activate_firmware() returned %d\n",
+                           rc);
                devtree_update();
        }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/src/drmgr/drslot_chrp_hea.c 
new/powerpc-utils-1.3.4/src/drmgr/drslot_chrp_hea.c
--- old/powerpc-utils-1.3.3/src/drmgr/drslot_chrp_hea.c 2016-12-12 
16:41:49.000000000 +0100
+++ new/powerpc-utils-1.3.4/src/drmgr/drslot_chrp_hea.c 2017-09-01 
23:48:19.000000000 +0200
@@ -56,6 +56,7 @@
 {
        int rc, len;
        FILE *file;
+       int my_errno;
 
        file = fopen(fname, "w");
        if (file == NULL) {
@@ -65,11 +66,13 @@
 
        len = strlen(name);
        rc = fwrite(name, 1, len, file);
+       my_errno = errno;
        fclose(file);
 
        rc = (rc >= 0) ? 0 : rc;
        if (rc)
-               say(ERROR, "Write to %s failed:\n%s\n", fname, strerror(errno));
+               say(ERROR, "Write to %s failed:\n%s\n", fname,
+                   strerror(my_errno));
 
        return rc;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/src/drmgr/drslot_chrp_mem.c 
new/powerpc-utils-1.3.4/src/drmgr/drslot_chrp_mem.c
--- old/powerpc-utils-1.3.3/src/drmgr/drslot_chrp_mem.c 2016-12-12 
16:41:49.000000000 +0100
+++ new/powerpc-utils-1.3.4/src/drmgr/drslot_chrp_mem.c 2017-09-01 
23:48:19.000000000 +0200
@@ -875,6 +875,7 @@
        int rc = 0;
        time_t t;
        char tbuf[128];
+       int my_errno;
 
        time(&t);
        strftime(tbuf, 128, "%T", localtime(&t));
@@ -892,11 +893,12 @@
        }
 
        rc = write(file, state_strs[state], strlen(state_strs[state]));
+       my_errno = errno;
        close(file);
 
        if (rc < 0) {
                say(ERROR, "Could not write to %s to %s memory\n\t%s\n",
-                   path, state_strs[state], strerror(errno));
+                   path, state_strs[state], strerror(my_errno));
                return rc;
        }
 
@@ -932,10 +934,11 @@
        int rc = 0;
 
        probe_file = open(MEM_PROBE_FILE, O_WRONLY);
-       if (probe_file <= 0) {
+       if (probe_file == -1) {
+               int my_errno = errno;
                say(DEBUG, "Could not open %s to probe memory\n",
                    MEM_PROBE_FILE);
-               return errno;
+               return my_errno;
        }
 
        for (scn = lmb->lmb_mem_scns; scn; scn = scn->next) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/src/drmgr/lsslot.c 
new/powerpc-utils-1.3.4/src/drmgr/lsslot.c
--- old/powerpc-utils-1.3.3/src/drmgr/lsslot.c  2016-12-12 16:41:49.000000000 
+0100
+++ new/powerpc-utils-1.3.4/src/drmgr/lsslot.c  2017-09-01 23:48:19.000000000 
+0200
@@ -584,7 +584,7 @@
                if (! node->is_owned || node->skip)
                        continue;
                
-               if (!usr_drc_name) {
+               if (usr_drc_name) {
                        if (cmp_drcname(node->drc_name, usr_drc_name))
                                insert_print_node(node);
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/src/errinjct/errinjct.c 
new/powerpc-utils-1.3.4/src/errinjct/errinjct.c
--- old/powerpc-utils-1.3.3/src/errinjct/errinjct.c     2016-12-12 
16:41:49.000000000 +0100
+++ new/powerpc-utils-1.3.4/src/errinjct/errinjct.c     2017-09-01 
23:48:19.000000000 +0200
@@ -740,12 +740,6 @@
                exit(1);
        }
 
-       if (get_platform() != PLATFORM_PSERIES_LPAR) {
-               fprintf(stderr, "%s: is not supported on the %s platform\n",
-                                                       argv[0], platform_name);
-               exit(1);
-       }
-
        /* Make sure the error injection facility is available */
        fd = open(EI_IBM_ERRINJCT, O_RDONLY);
        if (fd == -1) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.3/src/ppc64_cpu.c 
new/powerpc-utils-1.3.4/src/ppc64_cpu.c
--- old/powerpc-utils-1.3.3/src/ppc64_cpu.c     2016-12-12 16:41:49.000000000 
+0100
+++ new/powerpc-utils-1.3.4/src/ppc64_cpu.c     2017-09-01 23:48:19.000000000 
+0200
@@ -162,6 +162,11 @@
 
        sprintf(path, SYSFS_CPUDIR"/online", thread);
        rc = get_attribute(path, "%d", &online);
+
+       /* This attribute does not exist in kernels without hotplug enabled */
+       if (rc && errno == ENOENT)
+               return 1;
+
        if (rc || !online)
                return 0;
 

++++++ powerpc-utils-lsprop.patch ++++++
--- /var/tmp/diff_new_pack.VxF7EA/_old  2017-10-26 18:38:59.467049948 +0200
+++ /var/tmp/diff_new_pack.VxF7EA/_new  2017-10-26 18:38:59.467049948 +0200
@@ -1,7 +1,7 @@
-Index: powerpc-utils-1.3.3/src/lsprop.c
+Index: powerpc-utils-1.3.4/src/lsprop.c
 ===================================================================
---- powerpc-utils-1.3.3.orig/src/lsprop.c
-+++ powerpc-utils-1.3.3/src/lsprop.c
+--- powerpc-utils-1.3.4.orig/src/lsprop.c
++++ powerpc-utils-1.3.4/src/lsprop.c
 @@ -30,7 +30,7 @@
  #endif
  

++++++ systemd-dir.patch ++++++
--- /var/tmp/diff_new_pack.VxF7EA/_old  2017-10-26 18:38:59.475049576 +0200
+++ /var/tmp/diff_new_pack.VxF7EA/_new  2017-10-26 18:38:59.479049389 +0200
@@ -1,7 +1,7 @@
-Index: powerpc-utils-1.3.3/Makefile.am
+Index: powerpc-utils-1.3.4/Makefile.am
 ===================================================================
---- powerpc-utils-1.3.3.orig/Makefile.am
-+++ powerpc-utils-1.3.3/Makefile.am
+--- powerpc-utils-1.3.4.orig/Makefile.am
++++ powerpc-utils-1.3.4/Makefile.am
 @@ -181,7 +181,7 @@ src_drmgr_lsslot_LDADD = -lrtas
  
  if WITH_SYSTEMD


Reply via email to